4.1.3 Nicotine+ Extra's: Add On, ComboScripts
Set of easy to add combination of commands to display various system information
4.1.3.1 Time, Uptime
NoName 's Current time is 11:26:08 And system has been up for 1 days and 14:38 hours
- 1. Start Nicotine+
- 2. insert the following command in chat input-field
/al uptime //me 's |(var=(`uptime`) ; if [ -n "${var[11]}" ] ; then uptime | sed 's/,/ /g' | awk '{ print " Current time is " $1 " And system has been up for " $3 " days and " $5 " hours"}' ; else uptime | sed 's/,/ /g' | awk '{ print " Current time is " $1 " system has been up for " $3 " hours" }'; fi) - 3. Test the script by starting nUPTime with following command in chat input-field.
/uptime
4.1.3.2 Location, Date, Time
NoName is located in COUNTRY, time/date: Wednesday, August 30, 07:09:14:338263000
- 1. Start Nicotine+
- 2. insert the following command in chat input-field, replacing COUNTRY with your own :)
/al time //me is located in COUNTRY, time/date: |(date '+%A, %B %d, %X:%N' | sed -r 's/^(.+)/\1\ /')
- 3. Test the script by starting nMyLCTime with following command in chat input-field.
/time
4.1.3.3 System, Arch, CPU, CPUSpeed, Kernel
NoName has a GNU/Linux system on a i686 architecture running a VIA Nehemiah @ 999.936 MHz with kernel version 2.6.16
- 1. Start Nicotine+
- 2. insert the following command in chat input-field
/al sysinfo //me |(arch=`uname -m` ; os=`uname -o`; kernver=`uname -r` ; type=`cat /proc/cpuinfo | grep "model name" | sed 's/model name\t: / /g'` ; speed=`cat /proc/cpuinfo | grep "cpu MHz" | awk '{ print $4 }'` ; echo " has a $os system on a $arch architecture running a $type @ $speed MHz with kernel version $kernver") - 3. Test the script by starting nUPTime with following command in chat input-field.
/sysinfo
Thanks to:
lee8oi ( lee8oi [at] yahoo [dot] com)
for 4.1.4.1/3 commands
Back to Nicotine Guide