Koozali.org formerly Contribs.org

[UPDATE] smeserver-sysmon

Offline cactus

  • *
  • 4,880
    • http://www.snetram.nl
Re: [UPDATE] smeserver-sysmon
« Reply #15 on: February 04, 2008, 11:03:12 PM »
Since the broken symlinks prevent the sysmon service from starting no graphdata is collected,
I have fixed all symlinks manually and started sysmon after that. I will wait a few minutes, but my guess is the collecting of data will resume.

Unfortunately...

Code: [Select]
[root@homer rc0.d]# service sysmon start
Starting sysmon daemon: Unrecognized escape \s passed through at /usr/sbin/sysmon line 762.
syntax error at /usr/sbin/sysmon line 783, near "if $ERR
        "
syntax error at /usr/sbin/sysmon line 790, near "}"
Execution of /usr/sbin/sysmon aborted due to compilation errors.
                                                           [FAILED]
MasterSleepy I sincerely suggest you thoroughly test your new release (if you not already do so) before releasing ot to the public.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline cactus

  • *
  • 4,880
    • http://www.snetram.nl
Re: [UPDATE] smeserver-sysmon
« Reply #16 on: February 04, 2008, 11:08:33 PM »
Unfortunately...

Code: [Select]
[root@homer rc0.d]# service sysmon start
Starting sysmon daemon: Unrecognized escape \s passed through at /usr/sbin/sysmon line 762.
syntax error at /usr/sbin/sysmon line 783, near "if $ERR
        "
syntax error at /usr/sbin/sysmon line 790, near "}"
Execution of /usr/sbin/sysmon aborted due to compilation errors.
                                                           [FAILED]
The first error (line 762 should be fixed by replacing \s with a real space which would make the line read like I suggested to you:
Code: [Select]
        my $sambausernbr = `/usr/bin/smbstatus -b|grep '^[ 0-9]'|wc -l`;
Code: [Select]
[root@homer rc0.d]# service sysmon start
Starting sysmon daemon: syntax error at /usr/sbin/sysmon line 783, near "if $ERR
        "
syntax error at /usr/sbin/sysmon line 790, near "}"
Execution of /usr/sbin/sysmon aborted due to compilation errors.
                                                           [FAILED]
Now to fix the compilation error...
« Last Edit: February 05, 2008, 12:24:24 AM by cactus »
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline cactus

  • *
  • 4,880
    • http://www.snetram.nl
Re: [UPDATE] smeserver-sysmon
« Reply #17 on: February 04, 2008, 11:17:37 PM »
Now to fix the compilation error...
Which should be fixed by encapsulating the $ERR with brackets which would make line 783 read:

Code: [Select]
        if ($ERR)
After that the service starts succesfully, the /var/log/sysmon log start filling up with:
Code: [Select]
[root@homer sbin]# tail /var/log/sysmon
grep: Invalid regular expression
WARNING: The "printer admin" option is deprecated
grep: Invalid regular expression
WARNING: The "printer admin" option is deprecated

So I guess it is working now.

Here is the full patch
Code: [Select]
[root@homer sbin]# diff -u sysmon /usr/sbin/sysmon.new
--- /usr/sbin/sysmon      2008-02-04 23:19:54.000000000 +0100
+++ /usr/sbin/sysmon.new        2008-02-04 23:19:14.000000000 +0100
@@ -759,7 +759,7 @@
                     }
                 }
             }
-       my $sambausernbr = `/usr/bin/smbstatus -b|grep ^[\s0-9]|wc -l`;
+       my $sambausernbr = `/usr/bin/smbstatus -b|grep '^[ 0-9]'|wc -l`;
        RRDs::create("$RRDDIR/$SAMBAUSERRRD.rrd","-s","60",
                 "DS:$SAMBAUSER:GAUGE:180:0:U",
                 "RRA:MIN:0.5:1:1500",
@@ -779,7 +779,7 @@
                 "RRA:MAX:0.5:1440:797") unless -e "$RRDDIR/$SAMBAUSERRRD.rrd";
        RRDs::update("$RRDDIR/$SAMBAUSERRRD.rrd","N:" .trim($sambausernbr));
         my $ERR=RRDs::error;
-       if $ERR
+       if ($ERR)
        {
             print "ERROR while updating mydemo.rrd: $ERR\n";
             rename("$RRDDIR/$SAMBAUSERRRD.rrd","$RRDDIR/$SAMBAUSERRRD.bad");
@@ -788,4 +788,3 @@
        sleep(60-time%60);
         }
     }
-
« Last Edit: February 05, 2008, 12:25:25 AM by cactus »
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline cactus

  • *
  • 4,880
    • http://www.snetram.nl
Re: [UPDATE] smeserver-sysmon
« Reply #18 on: February 04, 2008, 11:39:45 PM »
So I guess it is working now.
Still no data in the graphs however...
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Re: [UPDATE] smeserver-sysmon
« Reply #19 on: February 05, 2008, 03:54:10 AM »
Hello all,

Here is a new version that solved a lot of problem, sorry for the inconvenient.
Symbolic link are now correct.
Daemon file is debug, thanks cactus.
 
RPM:
smeserver-sysmon-5.1-3.noarch.rpm

sRPM:
smeserver-sysmon-5.1-3.src.rpm

regards,
MasterSleepy.
« Last Edit: February 05, 2008, 04:00:28 AM by MasterSleepy »

Offline Franco

  • *
  • 1,171
    • http://contribs.org
Re: [UPDATE] smeserver-sysmon
« Reply #20 on: February 05, 2008, 04:59:07 AM »
Many Thanks!
Works like a charm now!  :smile:

Offline Franco

  • *
  • 1,171
    • http://contribs.org
Re: [UPDATE] smeserver-sysmon
« Reply #21 on: February 05, 2008, 05:49:04 AM »
OK! I celebrated too early :(
Samba Graphs OK, but everything else has sttoped!

Quote
[Tue Feb 05 02:41:24 2008] [error] [client 127.0.0.1] [Tue Feb  5 02:41:24 2008] sysmon: Name "esmith::LOADCPU_MAX" used only once: possible typo at /etc/e-smith/web/panels/manager/cgi-bin/sysmon line 309., referer: https://sme7.provobums.com/server-manager/cgi-bin/sysmon?state=detailed&typegraph=CPU
[Tue Feb 05 02:41:24 2008] [error] [client 127.0.0.1] [Tue Feb  5 02:41:24 2008] sysmon: Name "esmith::secmonth" used only once: possible typo at /etc/e-smith/web/panels/manager/cgi-bin/sysmon line 53., referer: https://sme7.provobums.com/server-manager/cgi-bin/sysmon?state=detailed&typegraph=CPU
[Tue Feb 05 02:41:24 2008] [error] [client 127.0.0.1] [Tue Feb  5 02:41:24 2008] sysmon: Name "esmith::LATENCY_MAX" used only once: possible typo at /etc/e-smith/web/panels/manager/cgi-bin/sysmon line 511., referer: https://sme7.provobums.com/server-manager/cgi-bin/sysmon?state=detailed&typegraph=CPU
[Tue Feb 05 02:41:24 2008] [error] [client 127.0.0.1] [Tue Feb  5 02:41:24 2008] sysmon: Name "esmith::sechour" used only once: possible typo at /etc/e-smith/web/panels/manager/cgi-bin/sysmon line 50., referer: https://sme7.provobums.com/server-manager/cgi-bin/sysmon?state=detailed&typegraph=CPU
[Tue Feb 05 02:41:24 2008] [error] [client 127.0.0.1] [Tue Feb  5 02:41:24 2008] sysmon: Name "esmith::MEM2_MAX" used only once: possible typo at /etc/e-smith/web/panels/manager/cgi-bin/sysmon line 424., referer: https://sme7.provobums.com/server-manager/cgi-bin/sysmon?state=detailed&typegraph=CPU
[Tue Feb 05 02:41:24 2008] [error] [client 127.0.0.1] [Tue Feb  5 02:41:24 2008] sysmon: Name "esmith::CURRENT" used only once: possible typo at /etc/e-smith/web/panels/manager/cgi-bin/sysmon line 71., referer: https://sme7.provobums.com/server-manager/cgi-bin/sysmon?state=detailed&typegraph=CPU
[Tue Feb 05 02:41:24 2008] [error] [client 127.0.0.1] [Tue Feb  5 02:41:24 2008] sysmon: Name "esmith::secyear" used only once: possible typo at /etc/e-smith/web/panels/manager/cgi-bin/sysmon line 54., referer: https://sme7.provobums.com/server-manager/cgi-bin/sysmon?state=detailed&typegraph=CPU
[Tue Feb 05 02:41:24 2008] [error] [client 127.0.0.1] [Tue Feb  5 02:41:24 2008] sysmon: Name "esmith::secday" used only once: possible typo at /etc/e-smith/web/panels/manager/cgi-bin/sysmon line 51., referer: https://sme7.provobums.com/server-manager/cgi-bin/sysmon?state=detailed&typegraph=CPU
[Tue Feb 05 02:41:24 2008] [error] [client 127.0.0.1] [Tue Feb  5 02:41:24 2008] sysmon: Use of uninitialized value in pattern match (m//) at /etc/e-smith/web/panels/manager/cgi-bin/sysmon line 1076., referer: https://sme7.provobums.com/server-manager/cgi-bin/sysmon?state=detailed&typegraph=CPU
[Tue Feb 05 02:41:24 2008] [error] [client 127.0.0.1] [Tue Feb  5 02:41:24 2008] sysmon: Use of uninitialized value in string eq at /etc/e-smith/web/panels/manager/cgi-bin/sysmon line 1087., referer: https://sme7.provobums.com/server-manager/cgi-bin/sysmon?state=detailed&typegraph=CPU

Offline Franco

  • *
  • 1,171
    • http://contribs.org
Re: [UPDATE] smeserver-sysmon
« Reply #22 on: February 05, 2008, 06:04:47 AM »
So to clarify once agai (Sorry guys, I just want to make this clear):
Code: [Select]
* If you are upgrading from a previous version you must remove
  all rrd files from /var/lib/rrd or graphs will not display
  correctly.
Does apply and you have to do it, otherwise existing graphs won't display correctly!

Offline kevinb

  • *
  • 237
Re: [UPDATE] smeserver-sysmon
« Reply #23 on: February 05, 2008, 06:25:51 AM »
Well I updated to smeserver-sysmon-5.1-3.

Removed all the files in /var/lib/rrd.

All I get is the Samba graph.

The only file I get in /var/lib/rrd is samba.rrd.

Kevin

Offline Franco

  • *
  • 1,171
    • http://contribs.org
Re: [UPDATE] smeserver-sysmon
« Reply #24 on: February 05, 2008, 06:29:56 AM »
Sorry to hear that Kevin, did you wait 5 minutes?
If so remove the contrib and reinstall again , it should start graphing again.

Offline Jáder

  • *
  • 1,061
    • LinuxFacil
Re: [UPDATE] smeserver-sysmon
« Reply #25 on: February 05, 2008, 12:03:37 PM »
Hi

Now the contrib works. But just after a install, remove and reinstall.
And just on a machine with sme7admin installed. On my newest production server it don't work.
Even without a remove and reinstall it do not create all .rrd files on /var/lib/rrd
Just as info I'm letting here my status (even after a 5 minute wait).

After first install, just two of them:
Code: [Select]
[root@pantera ~]# ls -la /var/lib/rrd/*
-rw-r--r--  1 root root 108156 Feb  5 08:54 /var/lib/rrd/samba.rrd
-rw-r--r--  1 root root   2328 Feb  5 08:54 /var/lib/rrd/sysmon.stats

after removing and reinstalling:
Code: [Select]
[root@pantera ~]# ls -la /var/lib/rrd/*
-rw-r--r--  1 root root  320876 Feb  5 08:59 /var/lib/rrd/drive_sda1.rrd
-rw-r--r--  1 root root  427236 Feb  5 08:59 /var/lib/rrd/host_gateway.rrd
-rw-r--r--  1 root root  427236 Feb  5 08:59 /var/lib/rrd/iface_eth0.rrd
-rw-r--r--  1 root root  427236 Feb  5 08:59 /var/lib/rrd/iface_eth1.rrd
-rw-r--r--  1 root root  182812 Feb  5 08:59 /var/lib/rrd/processors0.rrd
-rw-r--r--  1 root root  182812 Feb  5 08:59 /var/lib/rrd/processors1.rrd
-rw-r--r--  1 root root 2660796 Feb  5 08:59 /var/lib/rrd/processors.rrd
-rw-r--r--  1 root root  108156 Feb  5 08:59 /var/lib/rrd/samba.rrd
-rw-r--r--  1 root root 2341716 Feb  5 08:59 /var/lib/rrd/sysmon.rrd
-rw-r--r--  1 root root    2328 Feb  5 08:59 /var/lib/rrd/sysmon.stats
-rw-r--r--  1 root root  746316 Feb  5 08:59 /var/lib/rrd/ups.rrd

MasterSleepy, I think there are a little problem ... about recreate .rrd files. Not sure what, but on second install it's fixed.
Good luck on your hunting.

Jáder
« Last Edit: February 05, 2008, 02:54:56 PM by jader »
...

Offline cactus

  • *
  • 4,880
    • http://www.snetram.nl
Re: [UPDATE] smeserver-sysmon
« Reply #26 on: February 05, 2008, 05:16:54 PM »
So to clarify once agai (Sorry guys, I just want to make this clear):
Code: [Select]
* If you are upgrading from a previous version you must remove
  all rrd files from /var/lib/rrd or graphs will not display
  correctly.
Does apply and you have to do it, otherwise existing graphs won't display correctly!
Another suggestion as a contribution to the RPM as you can easily do so by adding this to the postun section of the SPEC file:
Code: [Select]
%postun
rm -rf /var/lib/rrd/*

See also the Install/Erase-time Scripts paragraph in Chapter 13: Inside the Spec File of "the Maximum RPM: Taking the Red Hat Package Manager to the Limit" on the http://www.rpm.org website.
« Last Edit: February 05, 2008, 05:18:36 PM by cactus »
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline kevinb

  • *
  • 237
Re: [UPDATE] smeserver-sysmon
« Reply #27 on: February 05, 2008, 08:20:23 PM »
OK .... the remove and reinstall worked!

Thanks everyone,

Kevin

Re: [UPDATE] smeserver-sysmon
« Reply #28 on: February 06, 2008, 09:17:10 AM »
Hello all,

I'll modify the contribs for the end of this week.
It will include the move of rrd file to a backup directory.
For the moment I create an entry in the wiki for this contrib.
http://wiki.contribs.org/Sysmon

Regards.
MasterSleepy.

Offline kevinb

  • *
  • 237
Re: [UPDATE] smeserver-sysmon
« Reply #29 on: February 06, 2008, 03:32:00 PM »
Hello MasterSleepy,

Thanks for all of your work on this great contrib. I have an issue, question and request.



When I cut and paste the commands from the wiki:
Code: [Select]
wget "http://www.vanhees.cc/modules.php?op=modload&name=CmodsDownload&file=index&req=viewdownloaddetails&lid=317"
wget "ftp://fr2.rpmfind.net/linux/dag/redhat/el4/en/i386/dag/RPMS/perl-rrdtool-1.0.50-3.el4.rf.i386.rpm"
wget "http://www.vanhees.cc/modules.php?op=modload&name=CmodsDownload&file=index&req=viewdownloaddetails&lid=300"

I get:
Code: [Select]
root root  35131 Feb  6 07:21 modules.php?op=modload&name=CmodsDownload&file=index&req=viewdownloaddetails&lid=300
root root  31200 Feb  6 07:21 modules.php?op=modload&name=CmodsDownload&file=index&req=viewdownloaddetails&lid=317
root root 185467 Feb  6 07:21 perl-rrdtool-1.0.50-3.el4.rf.i386.rpm

The two files from your website do not get pulled down.

This does work however:
Code: [Select]
wget "http://www.vanhees.cc/index.php?name=CmodsDownload&file=index&req=getit&lid=300"
wget "http://www.vanhees.cc/index.php?name=CmodsDownload&file=index&req=getit&lid=317"
wget "ftp://fr2.rpmfind.net/linux/dag/redhat/el4/en/i386/dag/RPMS/perl-rrdtool-1.0.50-3.el4.rf.i386.rpm"



On your website you show graphs of temperatore, RPM, Voltages, etc. I have never seen these graphs in any of my installs. Am I missing something?


Your graph of the hard drive space is a summation of all the mount points (if you have a 200 Gb 90% full, and a 500gb disk 10% full, the total capacty is shown as 700Gb 33% full). This is misleading. If you have time I believe it would be more informative to have a graph for each mount point like the "df -h" command.


Thanks again,

Kevin
« Last Edit: February 06, 2008, 03:36:01 PM by kevinb »