| View previous topic :: View next topic |
| Author |
Message |
arejay Voice
Joined: 22 Apr 2008 Posts: 7
|
Posted: Thu May 01, 2008 8:35 am Post subject: sysinfo 1.111 [FIXED] |
|
|
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: | [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
| Quote: | 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 |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Thu May 01, 2008 9:08 am Post subject: |
|
|
Not using the script, but I would assume that piece of code should read like this:
| Code: | 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, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
arejay Voice
Joined: 22 Apr 2008 Posts: 7
|
Posted: Sun May 04, 2008 1:49 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
cache Master
Joined: 10 Jan 2006 Posts: 306 Location: Mass
|
Posted: Sun May 04, 2008 5:01 am Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Sun May 04, 2008 4:00 pm Post subject: |
|
|
| Code: | 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"
} |
|
|
| Back to top |
|
 |
burn Voice

Joined: 04 May 2008 Posts: 1
|
Posted: Sun May 04, 2008 8:25 pm Post subject: |
|
|
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: | #!/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 |
|
| Back to top |
|
 |
arejay Voice
Joined: 22 Apr 2008 Posts: 7
|
Posted: Sun May 04, 2008 10:10 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Mon May 05, 2008 12:28 am Post subject: |
|
|
| 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? _________________ TCL the misunderstood |
|
| Back to top |
|
 |
arejay Voice
Joined: 22 Apr 2008 Posts: 7
|
Posted: Mon May 05, 2008 6:31 am Post subject: |
|
|
| it seems it didnt take the my .chattr handle +S and my host was off. all is well now. |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Mon May 05, 2008 9:05 am Post subject: |
|
|
| burn wrote: | | ... If someone knows how to 2>/dev/null in TCL, please let me know... |
Would be something like this:
| Code: | | 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, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
|