|
|
| Author |
Message |
aboyz Guest
|
Posted: Sat May 14, 2005 4:46 pm Post subject: good work!! |
|
|
excellent work on the install readme also!! this explain it more on how everything is operated!!! I'll try this on one of my postfix box and see how it runs..
thank you all for the good addon.. |
|
| Back to top |
|
 |
aboyz Guest
|
Posted: Mon May 16, 2005 8:38 pm Post subject: I don't see /usr/local/bin/allstat.sh? |
|
|
Hi,
In the code.. where you add in the. cat append_to_snmpd.conf.txt >> /usr/local/share/snmp/snmpd.conf
exec mailcount /usr/local/bin/allstat.sh
I don't see a file called allstat.sh? did you forgot to upload it?
thanks |
|
| Back to top |
|
 |
aboyz Guest
|
Posted: Mon May 16, 2005 9:04 pm Post subject: I'm getting error when running mailgraph.pl |
|
|
This is what I get when I run mailgraph.pl
mail08# ./mailgraph.sh start
Starting mailgraph.
mesg: /dev/ttyp0: Operation not permitted
Global symbol "$counttype" requires explicit package name at /usr/local/sbin/mailgraph.pl line 696.
Global symbol "$counttype" requires explicit package name at /usr/local/sbin/mailgraph.pl line 697.
Global symbol "$counttype" requires explicit package name at /usr/local/sbin/mailgraph.pl line 698.
Global symbol "$counttype" requires explicit package name at /usr/local/sbin/mailgraph.pl line 700.
Execution of /usr/local/sbin/mailgraph.pl aborted due to compilation errors.
This is what is on my mailgraph.pl line 696-700
open (CTF, "+< " . $file_path . $counttype) or next; # Skip if file isn't there
$sum{$counttype} += <CTF>; # Read & Add
seek (CTF, 0, 0); # Rewind file
print CTF $sum{$counttype} . "\n"; # Write new info
. Anyone know what is wrong? I'm running
freebsd 4.11
net-snmp 5.2.1
mailgraph 1.10
I follow the instruction as it is. i copy the mailgraph.pl that came with the zip file and replaced it on mailgraph.pl
Anyone know what that error mean? and how do i fix it
thanks |
|
| Back to top |
|
 |
jpingle
Joined: 09 May 2005 Posts: 37
|
Posted: Mon May 16, 2005 9:43 pm Post subject: |
|
|
This is probably a perl issue... What version of Perl are you using? (Try perl -v at a prompt) I'm using 5.8.0
| Quote: | | Global symbol "$counttype" requires explicit package name at /usr/local/sbin/mailgraph.pl line 696. |
That usually doesn't happen for loop variables, but you can try changing line 695 to:
| Code: | | foreach my $counttype (keys(%sum)) { |
(Note the added "my" in there...)
Or you could add a line that says:
Directly above the foreach line.
Let me know if that helps.
|
|
| Back to top |
|
 |
aboyz Guest
|
Posted: Mon May 16, 2005 10:06 pm Post subject: Ok. |
|
|
yeah that fixed it
I was using a older version of perl. 5.6.1
What about this file I don't have it. its the append file to be added in snmpd.sh I can't find anywhere on my system the allstat.sh
exec mailcount /usr/local/bin/allstat.sh
after starting snmpd.sh i get this
mail08# ./snmpd.sh restart
Stopping snmpd.
Waiting for PIDS: 12257.
exec: mailcount: not found
Starting snmpd.
exec: mailcount: not found
exec: mailcount: not found |
|
| Back to top |
|
 |
jpingle
Joined: 09 May 2005 Posts: 37
|
Posted: Mon May 16, 2005 10:21 pm Post subject: |
|
|
| Whoops... forgot to change that in the file in the zip. That should be "postfixstats.sh" not "allstats.sh" |
|
| Back to top |
|
 |
aboyz Guest
|
Posted: Mon May 16, 2005 10:29 pm Post subject: Hi, |
|
|
Hi,
I'm still getting.
mail08# ./snmpd.sh start
Starting snmpd.
exec: mailcount: not found
i checked and everythign is in the correct path.
any ideas??
Oh, it made be a chmod premission? should i chmod it to 555 or 755? |
|
| Back to top |
|
 |
aboyz Guest
|
Posted: Mon May 16, 2005 10:32 pm Post subject: can i see what you got in your snmpd.conf |
|
|
Hi,
can I see what you got in your snmpd.conf.
thank you for all the help.. |
|
| Back to top |
|
 |
jpingle
Joined: 09 May 2005 Posts: 37
|
Posted: Mon May 16, 2005 10:33 pm Post subject: |
|
|
Yeah, the .sh and .pl scripts should be chmod'd to be executable.
I uploaded a new version of the mailgraph-jjp.zip file to my original posting with updated instructions and a couple minor changes. |
|
| Back to top |
|
 |
jpingle
Joined: 09 May 2005 Posts: 37
|
Posted: Mon May 16, 2005 10:34 pm Post subject: |
|
|
The only special contents of my snmpd.conf file are the one line from the text file in the zip:
| Code: |
exec mailcount /usr/local/bin/postfixstats.sh
|
|
|
| Back to top |
|
 |
aboyz Guest
|
Posted: Mon May 16, 2005 10:44 pm Post subject: why does it give me error. |
|
|
I try to run that scripts from
/usr/local/bin/postfixstats.sh
and it return this.
mail08# ./postfixstats.sh
sent:0 received:0 rejected:0 bounced:0 spam:0 virus:0
What can be wrong? |
|
| Back to top |
|
 |
jpingle
Joined: 09 May 2005 Posts: 37
|
Posted: Mon May 16, 2005 10:46 pm Post subject: |
|
|
Either mailgraph hasn't updated the files properly, or it hasn't passed any mail
I'll check back tomorrow... |
|
| Back to top |
|
 |
aboyz Guest
|
Posted: Mon May 16, 2005 10:49 pm Post subject: thanks |
|
|
I think i know what the problems is..
mesg: /dev/ttyp0: Operation not permitted
when i start mailgraph
thats properly why its not starting
thank you!! i'll update you tommorrow!! |
|
| Back to top |
|
 |
aboyz Guest
|
Posted: Tue May 17, 2005 2:19 pm Post subject: can someone help me. |
|
|
Hi,
I'm still getting
mesg: /dev/ttyp0: Operation not permitted
when i run ./mailgraph.sh
anyone know what this mean? why it say operation not permitted? |
|
| Back to top |
|
 |
jpingle
Joined: 09 May 2005 Posts: 37
|
Posted: Tue May 17, 2005 2:31 pm Post subject: |
|
|
Are you running mailgraph as root?
Usually you'll get errors if it's not being run as root.
Try running this before running it again:
Check the permissions of /var/log/maillog
| Code: | | -rw-r----- 1 root wheel 64638461 May 17 14:26 /var/log/maillog |
And check the permissions of /dev/ttyp0
| Code: | | crw--w---- 1 <your username> tty 5, 0 May 17 14:28 /dev/ttyp0 |
You might also try not starting the script as ./mailgraph.sh, but start it like so:
| Code: | | /usr/local/etc/rc.d/mailgraph.sh start |
You can also check /var/log/messages to see if there are any other errors. |
|
| Back to top |
|
 |
|