This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

sysinfo 1.111 [FIXED]

Support & discussion of released scripts, and announcements of new releases.
Post Reply
a
arejay
Voice
Posts: 7
Joined: Tue Apr 22, 2008 9:18 am

sysinfo 1.111 [FIXED]

Post by arejay »

Just wondering if anyone else is running the sysinfo.tcl script from

http://www.bluedevil.ca/eggdrop/sysinfo1.11.tgz

i receive the following error in my console

Code: Select all

[08:28] Tcl error [pub:sys_sysinfo]: syntax error in expression " exec ./scripts/sysinfo281.06.pl ": variable references require preceding $

this is the offending line in the script

proc sys_dosysinfo { } {
if { exec ./scripts/sysinfo281.06.pl } { set sysinfo "Perl script is not executable or doesn't exist." }
return "$sysinfo"
}

any help would be great, thank's guys :)
Last edited by arejay on Tue May 06, 2008 7:36 am, edited 1 time in total.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Not using the script, but I would assume that piece of code should read like this:

Code: Select all

proc sys_dosysinfo { } {
 if {[catch {exec ./scripts/sysinfo281.06.pl} sysinfo]} {
  set sysinfo "Perl script is not executable or doesn't exist."
 }
 return "$sysinfo"
}
NML_375
a
arejay
Voice
Posts: 7
Joined: Tue Apr 22, 2008 9:18 am

Post by arejay »

no longer errors, but does not produce any output to the channel,

when i run the perl script in my shell, it outputs the data. just wont do it on IRC

(01:43 AM):(rj@cube)~/bots/infowar2$ ./scripts/sysinfo281.06.pl
Hostname: cube - OS: FreeBSD 7.0-RELEASE/i386 - CPU: 2 x AMD Athlon MP 2800+ (2133.42 MHz) - Processes: 13 - Uptime: 4d 14h 39m - Users: 3 - Load Average: 3.12 - Memory Usage: 1303.89MB/2546.90MB (51.20%) - Disk Usage: 26.52GB/73.59GB (36.03%)

when i do !sysinfo

i see
01:44] <<arejay>> !*! !sysinfo

I've been unable to find the authors e-mail or contact info.


Anyone know of any other sysinfo scripts.
c
cache
Master
Posts: 306
Joined: Tue Jan 10, 2006 4:59 am
Location: Mass

Post by cache »

arejay wrote:no longer errors, but does not produce any output to the channel,

when i run the perl script in my shell, it outputs the data. just wont do it on IRC

(01:43 AM):(rj@cube)~/bots/infowar2$ ./scripts/sysinfo281.06.pl
Hostname: cube - OS: FreeBSD 7.0-RELEASE/i386 - CPU: 2 x AMD Athlon MP 2800+ (2133.42 MHz) - Processes: 13 - Uptime: 4d 14h 39m - Users: 3 - Load Average: 3.12 - Memory Usage: 1303.89MB/2546.90MB (51.20%) - Disk Usage: 26.52GB/73.59GB (36.03%)

when i do !sysinfo

i see
01:44] <<arejay>> !*! !sysinfo

I've been unable to find the authors e-mail or contact info.


Anyone know of any other sysinfo scripts.
I do see contact info in script
# If you have any suggestions, questions or you want to report
# bugs, please feel free to send me an email to burn@bluedevil.ca


Theres one at tclscripts.com it works but only issue is ram/memory shows as ????/????, has started since I went to BSD 7
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Code: Select all

proc sys_dosysinfo { } {
 if {[catch {set sysinfo [exec ./scripts/sysinfo281.06.pl]} error]} {
  set sysinfo "Perl script is not executable or doesn't exist."
 }
 return "$sysinfo"
}
User avatar
burn
Voice
Posts: 1
Joined: Sun May 04, 2008 8:19 pm

Post by burn »

Its is not outputting anything to IRC because the perl script is crapping out at some point, due to OS security. Run it through bash instead.

sysinfo.sh

Code: Select all

#!/bin/bash

<full path>/sysinfo281.06.pl 2>/dev/null
Change tcl script to use the .sh script instead. If someone knows how to 2>/dev/null in TCL, please let me know.

I have plans to incorporate this into the sysinfo at some point. :)

burn
a
arejay
Voice
Posts: 7
Joined: Tue Apr 22, 2008 9:18 am

Post by arejay »

ok.

did the following now.

#!/usr/local/bin/bash
/home/rj/bots/infowar2/scripts/sysinfo281.06.pl 2>/dev/null

saved as sysinfo.sh and chmodded +x

(10:02 PM):(rj@cube)~/bots/infowar2/scripts$ ./sysinfo.sh
Hostname: cube - OS: FreeBSD 7.0-RELEASE/i386 - CPU: 2 x AMD Athlon MP 2800+ (2133.42 MHz) - Processes: 13 - Uptime: 5d 10h 58m - Users: 3 - Load Average: 1.19 - Memory Usage: 1317.20MB/2546.90MB (51.72%) - Disk Usage: 26.51GB/73.59GB (36.03%)


works fine in the shell.


doing !sysinfo in the channel

shows this in the console still


[22:06] <<arejay>> !*! !sysinfo

and no output to the channel.

btw: i started fresh and downloaded a new copy of your sysinfo 1.11 script and only changed the line for the .pl to use my sysinfo.sh
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

arejay wrote:... [22:06] <<arejay>> !*! !sysinfo ...
The display of "!*!" is usually an indication that the person using this command dosen't have an handle, have you checked that it requires the person to have a serton flag, that they have to be a valid user before it will display the output?
a
arejay
Voice
Posts: 7
Joined: Tue Apr 22, 2008 9:18 am

Post by arejay »

it seems it didnt take the my .chattr handle +S and my host was off. all is well now.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

burn wrote:... If someone knows how to 2>/dev/null in TCL, please let me know...
Would be something like this:

Code: Select all

set output [exec "command" "arg1" "arg" ... "argn" 2> /dev/null]
arg1 thru argn are optional and passed to the command as separate parameters, quotes are optional if there are no whitespaces in any of the argument but always recommended. "2>" and "<fileName>" (/dev/null) must be two separate arguments (that is, use 2> /dev/null not 2>/dev/null)
See the exec(n) manpage for further information on possible redirections with exec.
NML_375
Post Reply