aMule Forum
English => aMule Help => Topic started by: raffe1234 on August 13, 2017, 01:41:24 PM
-
Hi!
Under http://wiki.amule.org/wiki/Events#Linux I would move the citation mark from
if [ ! -z "$DLtime" ] ; then echo "Active download time:" $DLtime ; fi
to
if [ ! -z "$DLtime" ] ; then echo "Active download time: $DLtime" ; fi
If it says "hours" or "minutes" you will then also get that text. E.g. instead of it only saying "9:13" it will say "9:13 hours" or maybe "9:13 mins"
Maybe also even more tips on making the script give more info about the system. Some examples to add:
echo " "
echo "--------------------------------------------------------------------"
echo "-==============================-"
echo "-=======- NAS status -========-"
echo "-==============================-"
echo " "
echo "=== Uptime:"
uptime
echo " "
echo "=== User status:"
user_status show_all
echo " "
echo "=== Disk usage:"
df -h
echo " "
echo "=== aMule processes:"
ps | grep 'PID\|aMule'
echo " "
echo "=== Top processes:"
top -n 1
echo " "
echo "=== Memory:"
free
echo " "
echo "=== Route:"
route
echo " "
echo "=== IP numbers"
echo "$(ifconfig | grep inet | sed -r 's/^.{10}//')"
echo " "
echo "=== Default gateways"
route | grep default
echo " "
echo "=== DNS serves"
cat /etc/resolv.conf
echo " "
echo "=== Iptables:"
iptables -S
And maybe more cool stuff you here come up with :-)
-
Also, one more tip to the wiki. If you start the email part like this
...
...
{
echo To: name@somewhere.com
echo Subject: "$NameShort"
echo " "
# Mail header
echo "MIME-Version: 1.0"
echo "Content-Type: text/html"
echo "Content-Disposition: inline"
echo "<html>"
echo "<body>"
echo "<pre style="font: monospace">"
# Mail body
echo aMule completed this download:
echo ------------------------------
...
...
And end it like this
...
...
echo " "
echo --------------------------------------------------------------------
# Mail footer
echo "</pre>"
echo "</body>"
echo "</html>"
} | sendmail -t
The email will then be in html format and echo "<pre style="font: monospace">" will format the text so it will look nice.
So instead of the text looking like this:
=== Disk usage:
Filesystem Size Used Available Use% Mounted on
none 250.0M 194.1M 55.9M 78% /
devtmpfs 1.9G 4.0K 1.9G 0% /dev
tmpfs 64.0M 376.0K 63.6M 1% /tmp
tmpfs 1.9G 12.0K 1.9G 0% /dev/shm
tmpfs 16.0M 0 16.0M 0% /share
tmpfs 16.0M 0 16.0M 0% /share/snapshot/export
/dev/md9 493.5M 121.1M 372.3M 25% /mnt/HDA_ROOT
It will look like this
=== Disk usage:
Filesystem Size Used Available Use% Mounted on
none 250.0M 194.1M 55.9M 78% /
devtmpfs 1.9G 4.0K 1.9G 0% /dev
tmpfs 64.0M 376.0K 63.6M 1% /tmp
tmpfs 1.9G 12.0K 1.9G 0% /dev/shm
tmpfs 16.0M 0 16.0M 0% /share
tmpfs 16.0M 0 16.0M 0% /share/snapshot/export
/dev/md9 493.5M 121.1M 372.3M 25% /mnt/HDA_ROOT
-
Please PM me your desired wiki account name and email address, and I will create a wiki account for you. Thus you'll be able to make the desired changes in the wiki yourself.
-
Please PM me your desired wiki account name and email address, and I will create a wiki account for you. Thus you'll be able to make the desired changes in the wiki yourself.
Done my changes :-)