Ab sofort steht euch hier im Forum die neue Add-on Verwaltung zur Verfügung – eine zentrale Plattform für alles rund um Erweiterungen und Add-ons für den DSM.
Damit haben wir einen Ort, an dem Lösungen von Nutzern mit der Community geteilt werden können. Über die Team Funktion können Projekte auch gemeinsam gepflegt werden.
Was die Add-on Verwaltung kann und wie es funktioniert findet Ihr hier
SUPER !!!
Kannst dir ja den Web-Editor jetzt installieren, dann hast in Zukunft keine Probs mehr mit dem vi
Grüße, itari
#!/bin/ash
cat <<EOT
Content-type: text/html
<html><head><title>System-Info</title></head><body>
<style>body{font:11px Arial;background-color:#ddf;}a{text-decoration:none}</style>
<a name="back">
<h2>General system information for host $(hostname -s)
[$(ifconfig eth0 | grep inet | sed 's/^ *..........//' | sed 's/ .*$//')]</h2>
<a href="#cpu">CPU</a> | <a href="#memory">Memory</a> | <a href="#flash">Flash-Layout</a> |
<a href="#swap">Swap</a> | <a href="#devices">Devices</a> | <a href="#partitions">Partitions</a> |
<a href="#filesystems">File-Systems</a> | <a href="#raid">RAID-Volumes</a> | <a href="#mount">mounted Volumes</a> |
<a href="#fsusage">File-System Usage</a><br><a href="#linux">Installed Linux-Version</a> |
<a href="#modules">Installed Modules</a> | <a href="#user">User</a> | <a href="#processes">Processes</a> |
<a href="#interfaces">Network Interfaces</a> | <a href="#ports">Network Ports</a> | <a href="#nfs">NFS Mounts</a> |
<a href="#samba">Samba</a>
<div style='overflow:auto;position:absolute;top:80px'>
<h3><a name="cpu">CPU</h3><pre>$(cat /proc/cpuinfo)</pre>
<h3><a name="memory" href="#back">Memory</h3></a><pre>$(cat /proc/meminfo)<hr>$(free)</pre>
<h3><a name="flash" href="#back">Flash-Layout</h3></a><pre>$(cat /proc/mtd) </pre>
<h3><a name="swap" href="#back">Swap</h3></a><pre>$(cat /proc/swaps)<hr>$(sysctl -a| grep swap)</pre>
<h3><a name="devices" href="#back">Devices (Major-#)</h3></a><pre>$(cat /proc/devices)</pre>
<h3><a name="partitions" href="#back">Partitions</h3><pre></a>$(cat /proc/partitions)<hr>$(/sbin/sfdisk -l)</pre>
<h3><a name="filesystems" href="#back">File-Systems</h3></a><pre>$(cat /proc/filesystems)</pre>
<h3><a name="raid" href="#back">RAID-Volumes</h3></a><pre>$(cat /proc/mdstat)<hr>
$(for m in /dev/md?; do echo "$m"; /opt/sbin/dumpe2fs -h $m; done)<hr>
$(for m in /dev/md?; do echo ""; mdadm --query --detail $m; done)</pre>
<h3><a name="mount" href="#back">mounted Volumes</h3></a><pre>$(cat /proc/self/mounts)<hr>$(mount)</pre>
<h3><a name="fsusage" href="#back">File-System Usage</h3></a><pre>$(df)</pre>
<h3><a name="linux" href="#back">Installed Linux-Version</h3></a><pre>$(cat /proc/version)</pre>
<h3><a name="modules" href="#back">Installed Modules</h3></a><pre>$(cat /proc/modules)</pre>
<h3><a name="user" href="#back">User</h3></a><pre>$(cat /etc/passwd)<hr>$(who)</pre>
<h3><a name="processes" href="#back">Processes</h3></a><pre>$(ps)</pre>
<h3><a name="interfaces" href="#back">Network Interfaces</h3></a><pre>$(ifconfig -a)<hr>$(synoethinfo)</pre>
<h3><a name="ports" href="#back">Network Ports</h3></a><pre>$(netstat -na)</pre>
<h3><a name="nfs" href="#back">NFS Mounts</h3></a><pre>$(showmount)</a></pre>
<h3><a name="samba" href="#back">Samba</h3></a><pre>$(net -V)<br>$(smbstatus -vS)<br>
$(net status sessions)<br>$(net status shares)</pre>
</div></body></html>
EOT
#!/bin/ash
cat <<EOT
Content-type: text/html
<html><head><title>System-Info</title></head><body>
<style>body{font:11px Arial;background-color:#ddf;}a{text-decoration:none}</style>
<a name="back">
<h2>General system information for host $(hostname -s)
[$(ifconfig eth0 | grep inet | sed 's/^ *..........//' | sed 's/ .*$//')]
$(uptime | sed 's/, l.*//') hours</h2>
<a href="#cpu">CPU</a> | <a href="#memory">Memory</a> | <a href="#swap">Swap</a> |
<a href="#flash">Flash-Layout</a> | <a href="#swap">Swap</a> | <a href="#devices">Devices</a> |
<a href="#partitions">Partitions</a> |
<a href="#filesystems">File-Systems</a> | <a href="#raid">RAID-Volumes</a> |
<a href="#hibernate">Disk Wake-Up Protocol</a> | <a href="#mount">mounted Volumes</a> |
<a href="#fsusage">File-System Usage</a><br><a href="#linux">Installed Linux-Version</a> |
<a href="#modules">Installed Modules</a> | <a href="#user">User</a> | <a href="#processes">Processes</a> |
<a href="#cron">Cron</a> |
<a href="#interfaces">Network Interfaces</a> | <a href="#ports">Network Ports</a> | <a href="#nfs">NFS Mounts</a> |
<a href="#samba">Samba</a>
<div style='overflow:auto;position:absolute;top:80px'><br>
<h3><a name="cpu">CPU</h3><pre>$(cat /proc/cpuinfo)</pre>
<h3><a name="memory" href="#back">Memory</h3></a><pre>$(cat /proc/meminfo)</pre>
<img src="http://chart.apis.google.com/chart?cht=p&chs=250x120&
chd=$(free | awk 'NR==2{printf("t:%d,%d,%d,%d",$3/1000, $4/1000, $5/1000, $6/1000)}')&chl=Used|Free|Shared|Buffers&a
mp;chtt=Mem">
<img src="http://chart.apis.google.com/chart?cht=p&chs=250x120&
chd=$(free | awk 'NR==3{printf("t:%d,%d",$3/1000, $4/1000)}')&chl=Used|Free&chtt=Swap">
<pre>$(free)</pre>
<h3><a name="swap" href="#back">Swap</h3></a><pre>$(cat /proc/swaps)<hr>$(sysctl -a| grep swap)</pre>
<h3><a name="flash" href="#back">Flash-Layout</h3></a><pre>$(cat /proc/mtd) </pre>
<h3><a name="devices" href="#back">Devices (Major-#)</h3></a><pre>$(cat /proc/devices)</pre>
<h3><a name="partitions" href="#back">Partitions</h3><pre></a>$(cat /proc/partitions)<hr>$(/sbin/sfdisk -l)</pre>
<h3><a name="filesystems" href="#back">File-Systems</h3></a><pre>$(cat /proc/filesystems)</pre>
<h3><a name="raid" href="#back">RAID-Volumes</h3></a><pre>$(cat /proc/mdstat)<hr>
$(for m in /dev/md?; do echo "$m"; /opt/sbin/dumpe2fs -h $m; done)<hr>
$(for m in /dev/md?; do echo ""; mdadm --query --detail $m; done)</pre>
<h3><a name="hibernate" href="#back">Disk Wake-Up Protocol</a></h3>
<pre>$(grep 'standbytimer=' /etc/synoinfo.conf|sed 's/"//'|sed 's/"/ Minutes/')<br>
$(grep 'wake up' /var/log/messages|awk '{print $1" "$2" "$3" "$6" "$7}'|tail -n 20)</pre>
<h3><a name="mount" href="#back">mounted Volumes</h3></a><pre>$(cat /proc/self/mounts)<hr>$(mount)</pre>
<h3><a name="fsusage" href="#back">File-System Usage</h3></a><pre>$(df)</pre>
<img src="http://chart.apis.google.com/chart?cht=p&chs=200x120&
chd=$(df|awk '/rootfs/{printf("t:%d,%d",$3/$2*100, $4/$2*100)}')&chl=Used|Available&chtt=md0">
<img src="http://chart.apis.google.com/chart?cht=p&chs=200x120&
chd=$(df|awk '/volume1$/{printf("t:%d,%d",$3/$2*100, $4/$2*100)}')&chl=Used|Available&chtt=md2">
<img src="http://chart.apis.google.com/chart?cht=p&chs=200x120&
chd=$(df|awk '/tmp/{printf("t:%d,%d",$3/$2*100, $4/$2*100)}')&chl=Used|Available&chtt=tmp">
<h3><a name="linux" href="#back">Installed Linux-Version</h3></a><pre>$(cat /proc/version)</pre>
<h3><a name="modules" href="#back">Installed Modules</h3></a><pre>$(cat /proc/modules)</pre>
<h3><a name="user" href="#back">User</h3></a><pre>$(cat /etc/passwd)<hr>$(who)</pre>
<h3><a name="processes" href="#back">Processes</h3></a><pre>$(ps)</pre>
<h3><a name="cron" href="#back">Cron</h3></a><pre>$(ps | grep crond | grep -v grep >/dev/null &&
echo "crond is running" || echo "crond is not running")<br><br>$(cat /etc/crontab)</pre>
<h3><a name="interfaces" href="#back">Network Interfaces</h3></a><pre>$(ifconfig -a)<hr>$(synoethinfo)</pre>
<h3><a name="ports" href="#back">Network Ports</h3></a><pre>$(netstat -na)</pre>
<h3><a name="nfs" href="#back">NFS Mounts</h3></a><pre>$(showmount)</a></pre>
<h3><a name="samba" href="#back">Samba</h3></a><pre>$(net -V)<br>$(smbstatus -vS)<br>
$(net status sessions)<br>$(net status shares)</pre>
</div></body></html>
EOT
#!/bin/ash
cat <<EOT
Content-type: text/html
<html><head><title>System-Info</title></head><body>
<style>body{font:11px Arial;background-color:#ddf;}a{text-decoration:none}</style>
<a name="back">
<h2>General system information for host $(hostname -s)
[$(ifconfig eth0 | grep inet | sed 's/^ *..........//' | sed 's/ .*$//')]
$(uptime | sed 's/, l.*//') hours</h2>
<a href="#cpu">CPU</a> | <a href="#memory">Memory</a> | <a href="#swap">Swap</a> |
<a href="#flash">Flash-Layout</a> | <a href="#swap">Swap</a> | <a href="#devices">Devices</a> |
<a href="#partitions">Partitions</a> |
<a href="#filesystems">File-Systems</a> | <a href="#raid">RAID-Volumes</a> |
<a href="#hibernate">Disk Wake-Up Protocol</a> | <a href="#mount">mounted Volumes</a> |
<a href="#fsusage">File-System Usage</a><br><a href="#linux">Installed Linux-Version</a> |
<a href="#modules">Installed Modules</a> | <a href="#ipkg">Itsy Package Management System</a> |
<a href="#user">User</a> | <a href="#processes">Processes</a> |
<a href="#cron">Cron</a><br>
<a href="#interfaces">Network Interfaces</a> | <a href="#ports">Network Ports</a> |
<a href="#dns">Domain Name System</a> | <a href="#netstat">Network Statistics</a> |
<a href="#nfs">NFS Mounts</a> | <a href="#samba">Samba</a>
<div style='overflow:auto;position:absolute;top:80px'><br>
<h3><a name="cpu">CPU</h3><pre>$(cat /proc/cpuinfo)</pre>
<h3><a name="memory" href="#back">Memory</h3></a><pre>$(cat /proc/meminfo)</pre>
<img src="http://chart.apis.google.com/chart?cht=p3&chs=250x120&chco=0000ff&chf=bg,s,efefef00&
chd=$(free | awk 'NR==2{printf("t:%d,%d,%d,%d",$3/1000, $4/1000, $5/1000, $6/1000)}')&chl=Used|Free|Shared
mp;chtt=Mem">
<img src="http://chart.apis.google.com/chart?cht=p3&chs=250x120&chco=0000ff&chf=bg,s,efefef00&
chd=$(free | awk 'NR==3{printf("t:%d,%d",$3/1000, $4/1000)}')&chl=Used|Free&chtt=Swap">
<pre>$(free)</pre>
<h3><a name="swap" href="#back">Swap</h3></a><pre>$(cat /proc/swaps)<hr>$(sysctl -a| grep swap)</pre>
<h3><a name="flash" href="#back">Flash-Layout</h3></a><pre>$(cat /proc/mtd) </pre>
<h3><a name="devices" href="#back">Devices (Major-#)</h3></a><pre>$(cat /proc/devices)<br>
USB devices:$(cat /proc/bus/usb/devices)</pre>
<h3><a name="partitions" href="#back">Partitions</h3><pre></a>$(cat /proc/partitions)<hr>$(/sbin/sfdisk -l)</p
<h3><a name="filesystems" href="#back">File-Systems</h3></a><pre>$(cat /proc/filesystems)</pre>
<h3><a name="raid" href="#back">RAID-Volumes</h3></a><pre>$(cat /proc/mdstat)<hr>
$(for m in /dev/md?; do echo "$m"; /opt/sbin/dumpe2fs -h $m; done)<hr>
$(for m in /dev/md?; do echo ""; mdadm --query --detail $m; done)</pre>
<h3><a name="hibernate" href="#back">Disk Wake-Up Protocol</a></h3>
<pre>$(grep 'standbytimer=' /etc/synoinfo.conf|sed 's/"//'|sed 's/"/ Minutes/')<br>
$(grep 'wake up' /var/log/messages|awk '{print $1" "$2" "$3" "$6" "$7}'|tail -n 20)</pre>
<h3><a name="mount" href="#back">mounted Volumes</h3></a><pre>$(cat /proc/self/mounts)<hr>$(mount)</pre>
<h3><a name="fsusage" href="#back">File-System Usage</h3></a><pre>$(df)</pre>
<img src="http://chart.apis.google.com/chart?cht=p3&chs=240x120&chco=0000ff&chf=bg,s,efefef00&
chd=$(df|awk '/rootfs/{printf("t:%d,%d",$3/$2*100, $4/$2*100)}')&chl=Used|Available&chtt=md0">
<img src="http://chart.apis.google.com/chart?cht=p3&chs=240x120&chco=0000ff&chf=bg,s,efefef00&
chd=$(df|awk '/volume1$/{printf("t:%d,%d",$3/$2*100, $4/$2*100)}')&chl=Used|Available&chtt=md2">
<img src="http://chart.apis.google.com/chart?cht=p3&chs=240x120&chco=00ff00&chf=bg,s,efefef00&
chd=$(df|awk '/tmp/{printf("t:%d,%d",$3/$2*100, $4/$2*100)}')&chl=Used|Available&chtt=tmp">
<h3><a name="linux" href="#back">Installed Linux-Version</h3></a><pre>$(cat /proc/version)</pre>
<h3><a name="modules" href="#back">Installed Modules</h3></a><pre>$(lsmod)</pre>
<h3><a name="ipkg" href="#back">Itsy Package Management System</h3></a><pre>$(ipkg list_installed)</pre>
<h3><a name="user" href="#back">User</h3></a><pre>$(cat /etc/passwd)<hr>$(who -a)</pre>
<h3><a name="processes" href="#back">Processes</h3></a><pre>$(ps)</pre>
<h3><a name="cron" href="#back">Cron</h3></a><pre>$(ps | grep crond | grep -v grep >/dev/null &&
echo "crond is running" || echo "crond is not running")<br><br>$(cat /etc/crontab)</pre>
<h3><a name="interfaces" href="#back">Network Interfaces</h3></a><pre>$(ifconfig -a)<hr>$(synoethinfo)<hr>ARP
$(cat /proc/net/arp)<br><br>$(netstat -r)</pre>
<h3><a name="ports" href="#back">Network Ports</h3></a><pre>$(netstat -a|awk '/UNIX/{print "\n"}{print $0}')</
<h3><a name="dns" href="#back">Domain Name System</h3></a><pre>$(cat /etc/resolv.conf)</pre>
<h3><a name="netstat" href="#back">Network Statistics</h3></a><pre>$(ping -c 2 ipkg.nslu2-linux.org)<br>
$(</proc/net/dev sed 's/:/ /'|awk 'NR>2{printf("%-4s Received: %10d kB Transmit: %10d kB\n",$1,$2/1000,$10
<br>Average Packet-Size</br>
$(</proc/net/dev sed 's/:/ /'|awk 'NR>2{printf("%-4s Received: %10d Bytes Transmit: %10d Bytes\n",$1,$2/$3,$1
</pre>
<h3><a name="nfs" href="#back">NFS Mounts</h3></a><pre>$(showmount)</a></pre>
<h3><a name="samba" href="#back">Samba</h3></a><pre>$(net -V)<br>$(smbstatus -vS)<br>
$(net status sessions)<br>$(net status shares)</pre>
</div></body></html>
EOT
und du hast natürlich recht, das läuft so nicht, weil ein paar Zeilen zu kurz sind. Soooooooorrrrrrryyyyyy 
.
).#!/bin/ash
cat <<EOT
Content-type: text/html
<html><head><title>System-Info</title></head><body>
<style>body{font:11px Arial;background-color:#ddf;}a{text-decoration:none}</style>
<a name="back">
<h3>General system information for host $(hostname -s)
[$(ifconfig eth0 | grep inet | sed 's/^ *..........//' | sed 's/ .*$//')]
$(uptime | sed 's/, l.*//') hours</h3>
<a href="#cpu">CPU</a> |
<a href="#memory">Memory</a> |
<a href="#swap">Swap</a> |
<a href="#flash">Flash-Layout</a> |
<a href="#swap">Swap</a> |
<a href="#devices">Devices</a> |
<a href="#partitions">Partitions</a> |
<a href="#filesystems">File-Systems</a> |
<a href="#raid">RAID-Volumes</a> |
<a href="#hibernate">Disk Wake-Up Protocol</a> |
<a href="#mount">mounted Volumes</a> |
<a href="#fsusage">File-System Usage</a><br>
<a href="#linux">Installed Linux-Version</a> |
<a href="#modules">Installed Modules</a> |
<a href="#ipkg">Itsy Package Management System</a> |
<a href="#user">User</a> |
<a href="#processes">Processes</a> |
<a href="#cron">Cron</a><br>
<a href="#interfaces">Network Interfaces</a> |
<a href="#ports">Network Ports</a> |
<a href="#dns">Domain Name System</a> |
<a href="#netstat">Network Statistics</a> |
<a href="#nfs">NFS Mounts</a> |
<a href="#samba">Samba</a>
<h3><a name="cpu">CPU</h3><pre>$(cat /proc/cpuinfo)</pre>
<h3><a name="memory" href="#back">Memory</h3></a><pre>$(cat /proc/meminfo)</pre>
<img src="http://chart.apis.google.com/chart?cht=p3&chs=250x120&chco=0000ff&
chf=bg,s,efefef00&&chl=Used|Free|Shared|Buffers&chtt=Mem&
chd=$(free | awk 'NR==2{printf("t:%d,%d,%d,%d",$3/1000, $4/1000, $5/1000, $6/1000)}')">
<img src="http://chart.apis.google.com/chart?cht=p3&chs=250x120&chco=0000ff&
chf=bg,s,efefef00&chl=Used|Free&chtt=Swap&
chd=$(free | awk 'NR==3{printf("t:%d,%d",$3/1000, $4/1000)}')">
<pre>$(free)</pre>
<h3><a name="swap" href="#back">Swap</h3></a><pre>$(cat /proc/swaps)<hr>$(sysctl -a|grep swap)</pre>
<h3><a name="flash" href="#back">Flash-Layout</h3></a><pre>$(cat /proc/mtd) </pre>
<h3><a name="devices" href="#back">Devices (Major-#)</h3></a><pre>$(cat /proc/devices)<br>
USB devices:$(cat /proc/bus/usb/devices)</pre>
<h3><a name="partitions" href="#back">Partitions</h3><pre></a>$(cat /proc/partitions)<hr>
$(/sbin/sfdisk -l)</pre>
<h3><a name="filesystems" href="#back">File-Systems</h3></a><pre>$(cat /proc/filesystems)</pre>
<h3><a name="raid" href="#back">RAID-Volumes</h3></a><pre>$(cat /proc/mdstat)<hr>
$(for m in /dev/md?; do echo "$m"; /opt/sbin/dumpe2fs -h $m; done)<hr>
$(for m in /dev/md?; do echo ""; mdadm --query --detail $m; done)</pre>
<h3><a name="hibernate" href="#back">Disk Wake-Up Protocol</a></h3>
<pre>$(grep 'standbytimer=' /etc/synoinfo.conf|sed 's/"//'|sed 's/"/ Minutes/')<br>
$(grep 'wake up' /var/log/messages|awk '{print $1" "$2" "$3" "$6" "$7}'|tail -n 20)</pre>
<h3><a name="mount" href="#back">mounted Volumes</h3></a><pre>$(cat /proc/self/mounts)<hr>
$(mount)</pre>
<h3><a name="fsusage" href="#back">File-System Usage</h3></a><pre>$(df)</pre>
<img src="http://chart.apis.google.com/chart?cht=p3&chs=240x120&chco=0000ff&
chf=bg,s,efefef00&;chl=Used|Available&chtt=md0&
chd=$(df|awk '/rootfs/{printf("t:%d,%d",$3/$2*100, $4/$2*100)}')">
<img src="http://chart.apis.google.com/chart?cht=p3&chs=240x120&chco=0000ff&
chf=bg,s,efefef00&chl=Used|Available&chtt=md2&
chd=$(df|awk '/volume1$/{printf("t:%d,%d",$3/$2*100, $4/$2*100)}')">
<img src="http://chart.apis.google.com/chart?cht=p3&chs=240x120&chco=00ff00&
chf=bg,s,efefef00&chl=Used|Available&chtt=tmp&
chd=$(df|awk '/tmp/{printf("t:%d,%d",$3/$2*100, $4/$2*100)}')">
<h3><a name="linux" href="#back">Installed Linux-Version</h3></a><pre>$(cat /proc/version)</pre>
<h3><a name="modules" href="#back">Installed Modules</h3></a><pre>$(lsmod)</pre>
<h3><a name="ipkg" href="#back">Itsy Package Management System</h3></a><pre>$(ipkg list_installed)</pre>
<h3><a name="user" href="#back">User</h3></a><pre>$(cat /etc/passwd)<hr>$(who -a)</pre>
<h3><a name="processes" href="#back">Processes</h3></a><pre>$(ps)</pre>
<h3><a name="cron" href="#back">Cron</h3></a><pre>$(ps|grep crond|grep -v grep >/dev/null &&
echo "crond is running" || echo "crond is not running")<br><br>$(cat /etc/crontab)</pre>
<h3><a name="interfaces" href="#back">Network Interfaces</h3></a><pre>$(ifconfig -a)<hr>
$(synoethinfo)<hr>ARP
$(cat /proc/net/arp)<br><br>$(netstat -r)</pre>
<h3><a name="ports" href="#back">Network Ports</h3></a>
<pre>$(netstat -a|awk '/UNIX/{print "\n"}{print $0}')</pre>
<h3><a name="dns" href="#back">Domain Name System</h3></a><pre>$(cat /etc/resolv.conf)</pre>
<h3><a name="netstat" href="#back">Network Statistics</h3></a><pre>$(ping -c 2 ipkg.nslu2-linux.org)<br>
$(</proc/net/dev sed 's/:/ /'|
awk 'NR>2{printf("%-4s Received: %10d kB Transmit: %10d kB\n",$1,$2/1000,$10/1000)}')
<br>Average Packet-Size</br>
$(</proc/net/dev sed 's/:/ /'|
awk 'NR>2{printf("%-4s Received: %10d Bytes Transmit: %10d Bytes\n",$1,$2/$3,$10/$11)}')
</pre>
<h3><a name="nfs" href="#back">NFS Mounts</h3></a><pre>$(showmount)</a></pre>
<h3><a name="samba" href="#back">Samba</h3></a><pre>$(net -V)<br>$(smbstatus -vS)<br>
$(net status sessions)<br>$(net status shares)</pre>
</body></html>
EOT
Wenn du das Forum hilfreich findest oder uns unterstützen möchtest, dann gib uns doch einfach einen Kaffee aus.
Als Dankeschön schalten wir deinen Account werbefrei.