[SOLVED] Disabling output for Cron Job

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
mrtechguy
Posts: 8
Joined: Thu Feb 21, 2008 4:55 am

[SOLVED] Disabling output for Cron Job

Post by mrtechguy »

Hello all,
I was wondering if there was a flag I can pass to the poller script to disable the output, as at the moment I am getting an email saying this:

Code: Select all

OK u:0.01 s:0.01 r:3.12
cat: /proc/meminfo: No such file or directory
OK u:0.01 s:0.01 r:5.15
OK u:0.01 s:0.01 r:5.15
OK u:0.01 s:0.01 r:6.17
cat: /proc/meminfo: No such file or directory
ping: not found
OK u:0.01 s:0.01 r:7.19
OK u:0.01 s:0.01 r:7.20
OK u:0.01 s:0.01 r:8.25
OK u:0.01 s:0.01 r:8.25
OK u:0.01 s:0.02 r:8.25
OK u:0.01 s:0.02 r:8.25
OK u:0.01 s:0.02 r:8.25
OK u:0.01 s:0.02 r:8.26
OK u:0.01 s:0.02 r:9.29
OK u:0.01 s:0.02 r:9.29
OK u:0.01 s:0.02 r:9.29
OK u:0.01 s:0.02 r:9.29
OK u:0.01 s:0.02 r:9.29
OK u:0.01 s:0.02 r:10.31
OK u:0.01 s:0.02 r:10.32
OK u:0.01 s:0.02 r:11.34
OK u:0.01 s:0.03 r:11.34
OK u:0.01 s:0.03 r:11.34
OK u:0.02 s:0.03 r:12.37
OK u:0.02 s:0.03 r:12.37
OK u:0.02 s:0.03 r:13.39
OK u:0.02 s:0.03 r:14.42
OK u:0.02 s:0.03 r:14.42
OK u:0.02 s:0.03 r:15.44
OK u:0.02 s:0.03 r:15.45
OK u:0.02 s:0.03 r:16.47
OK u:0.02 s:0.03 r:17.49
02/21/2008 08:45:20 PM - SYSTEM STATS: Time:19.0594 Method:cmd.php Processes:10 Threads:N/A Hosts:5 HostsPerProcess:1 DataSources:45 RRDsProcessed:31

-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. 
You can see where that is going to get annoying seen as I get it every 5 minutes of every day.

Also how can I get rid of the error about /proc/meminfo?

Cheers
MTG
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Re: Disabling output for Cron Job

Post by fmangeant »

Hi
mrtechguy wrote:Hello all,
I was wondering if there was a flag I can pass to the poller script to disable the output, as at the moment I am getting an email saying this:
you just have to redirect the output of the cron job :

Code: Select all

*/5 * * * * /bin/php /path/to/cacti/poller.php > /dev/null 2>&1
mrtechguy wrote: Also how can I get rid of the error about /proc/meminfo?
Are you using the "Local Linux Machine" host template on something else than a Linux host ?
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
mrtechguy
Posts: 8
Joined: Thu Feb 21, 2008 4:55 am

Post by mrtechguy »

I am using that template on FreeBSD. Also I can't really grasp how to add hosts/graphs/data queries, it is all pretty confusing, just the way you add the graphs and it doesn't graph.
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Can you configure Net-SNMP on your FreeBSD host, and then create a device in Cacti using the "ucd/net SNMP" host template ?
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
mrtechguy
Posts: 8
Joined: Thu Feb 21, 2008 4:55 am

Post by mrtechguy »

I will try that.
I have reduced the email output, but still receives.

Code: Select all

cat: /proc/meminfo: No such file or directory
cat: /proc/meminfo: No such file or directory
ping: not found

-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. 
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

IMHO you should delete all graphs based on the "Local Linux machine" host template.

For the 'ping' error, are you using the "Unix - Ping Latency" graph template ?
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
mrtechguy
Posts: 8
Joined: Thu Feb 21, 2008 4:55 am

Post by mrtechguy »

Yeah, I am using the ping latency one. The ping command does exist on my server though.
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Can you check that the ping command is in cactiusers's PATH ?
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
mrtechguy
Posts: 8
Joined: Thu Feb 21, 2008 4:55 am

Post by mrtechguy »

I have managed to fix all problems, just need to figure out how to add graphs/hosts/data sources properly.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest