nv-l
[Top] [All Lists]

Re: [nv-l] NV on Linux

To: nv-l@lists.us.ibm.com
Subject: Re: [nv-l] NV on Linux
From: Paul <pstroud@bellsouth.net>
Date: Fri, 10 Oct 2003 18:33:43 -0400
Delivery-date: Fri, 10 Oct 2003 23:40:50 +0100
Envelope-to: nv-l-archive@lists.skills-1st.co.uk
In-reply-to: <1065801656.10504.13.camel@chibuku.ns.carilion.com>
References: <1065801656.10504.13.camel@chibuku.ns.carilion.com>
Reply-to: nv-l@lists.us.ibm.com
Sender: owner-nv-l-digest@lists.us.ibm.com
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b; MultiZilla v1.4.0.4A) Gecko/20030507
Mahesh,
Why are you using a script? Why not just run the command from cron?
I don't know if it will make any difference, but it is worth a try.

Paul



Mahesh Tailor wrote:

Hello, all!

This might a bit off subject, but someone might be able to help.

NV: 7.1.3 FP1
OS: RedHat Linux Enterprise AS

I have a script (/tmp/t.sh) with the following contents:

#!/bin/ksh

/usr/OV/bin/snmpColDump -t /usr/OV/databases/snmpCollect/ifInOctets.1 >
/tmp/t.out

When I execute this file from the root prompt, /tmp/t.out contains the
following:

10/09/2003 10:55:52 AM  myrouter.net.carilion.com     125.858 1065711352
10/09/2003 10:55:52 AM  myrouter.net.carilion.com     26968.6 1065711352

I then add the following to root's crontab:

54 08 * * * /tmp/t.sh 1>/dev/null 2>&1

When this cronjob is executed, /tmp/t.out contains the following:

10/09/2003 10:55:52     myrouter.net.carilion.com     125.858 1065711352
10/09/2003 10:55:52     myrouter.net.carilion.com     26968.6 1065711352

As you can see the AM/PM indicator is missing.

I have tried with #!/bin/ksh, #!/bin/bash. #!/myshell/ksh [this is the
ksh for Linux available from David Korn's website], and #!/bin/sh, with
the same results.

Also, running the snmpColDump directly from the root prompt, gives the
same output with the AM/PM indicator.

Why is this?  Is this a bug in snmpColDump? cron? environment?  Is there
a way to force snmpColDump to output in 24-hour format?

Any insight would be greatly appreciated.

TIA

Mahesh






<Prev in Thread] Current Thread [Next in Thread>

Archive operated by Skills 1st Ltd

See also: The NetView Web