Re: Two snmp questions

Wes Hardaker <[email protected]>
Newsgroups gmane.network.net-snmp.user
Organization Sparta
Message-ID <[email protected]>
>>>>> On Fri, 28 May 2010 10:53:18 -0400, X Z <[email protected]> said:

XZ> [XZ] I tried 'ps' to 'grep' the process status (with long name), it
XZ> does have a valid pid. If I put this process in a service script,
XZ> and then check the service status, it says:MyOwnCustomizedProcess
XZ> (pid 2947) is running...  But on the same machine(RHEL5 x86_64), if
XZ> I put "proc MyOwnCustomizedProcess" in snmpd.conf, it always says
XZ> the process not running.  Is it possible that the snmpd.conf parser
XZ> limits the name length?  ThanksXuan

Linux uses /proc/PID/status for reading the process name from.  In
particular, in that file is a "Name:" line.  The linux kernel limits the
length of data reported in that line to something shorter than your
name.  If you go look in the status file for your particular process
you'll find a truncated name (and you can use that name instead of your
full name to solve your problem).

(eg, I created a script called "mysuperlongprocessnameisreallycool" and
linux truncated it to: "mysuperlongproc")
-- 
Wes Hardaker
Cobham Analytic Solutions

------------------------------------------------------------------------------

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.