Request: JDK scripts
Moderators: Developers, Moderators
-
- Cacti User
- Posts: 50
- Joined: Sun Apr 01, 2007 12:47 am
Request: JDK scripts
OS:Windows 2K Server
JAVA;JDK 1.5
I want to monitor cpu threads of Java processes. But in my system there have two java processed and both of them I need monitor . I have found its OID ( .1.3.6.1.4.1.311.1.1.3.1.1.7.1.14.4.106.97.118.97 ) . I use snmpwalk to query its data and it'll return three kinds of value ,one is 0 ,the other two are what I require(Every time I run snmpwalk,then get one value,for example First run snmpwalk and it get 0,the second and it get 1, the third it'll be 2). I have created a template but it always returns one value(not 0). How can I write this template? Thanks
JAVA;JDK 1.5
I want to monitor cpu threads of Java processes. But in my system there have two java processed and both of them I need monitor . I have found its OID ( .1.3.6.1.4.1.311.1.1.3.1.1.7.1.14.4.106.97.118.97 ) . I use snmpwalk to query its data and it'll return three kinds of value ,one is 0 ,the other two are what I require(Every time I run snmpwalk,then get one value,for example First run snmpwalk and it get 0,the second and it get 1, the third it'll be 2). I have created a template but it always returns one value(not 0). How can I write this template? Thanks
- Attachments
-
- cacti_graph_template_xmlrpc_java_cpu_threads2.xml
- (15.17 KiB) Downloaded 167 times
Last edited by benton2006 on Sat Oct 27, 2007 6:58 pm, edited 1 time in total.
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
If only graphing a single (or two single) OIDs, please find help at http://docs.cacti.net/node/200
For a script returning more than one output, please refer to http://docs.cacti.net/node/203 instead
Reinhard
For a script returning more than one output, please refer to http://docs.cacti.net/node/203 instead
Reinhard
-
- Cacti User
- Posts: 50
- Joined: Sun Apr 01, 2007 12:47 am
-
- Cacti User
- Posts: 50
- Joined: Sun Apr 01, 2007 12:47 am
-
- Cacti User
- Posts: 50
- Joined: Sun Apr 01, 2007 12:47 am
processThreadCount OBJECT-TYPE
SYNTAX INTEGER
ACCESS read-only
STATUS mandatory
DESCRIPTION
"The number of threads currently active in this process. An instruction is the basic unit of execution in a processor, and a thread is the object that executes instructions. Every running process has at least one thread."
::= { processprocessEntry 14 }
SYNTAX INTEGER
ACCESS read-only
STATUS mandatory
DESCRIPTION
"The number of threads currently active in this process. An instruction is the basic unit of execution in a processor, and a thread is the object that executes instructions. Every running process has at least one thread."
::= { processprocessEntry 14 }
- Attachments
-
- Process-mib.TXT
- (13.99 KiB) Downloaded 154 times
-
- Cacti User
- Posts: 50
- Joined: Sun Apr 01, 2007 12:47 am
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Please perform an snmpwalk against and return the whole result. Please repeat several times to see, if the index (everything following .1.3.6.1.4.1.311.1.1.3.1.1.7.1.14 on the OID) is always the same
Reinhard
Code: Select all
.1.3.6.1.4.1.311.1.1.3.1.1.7.1.14
Reinhard
-
- Cacti User
- Posts: 50
- Joined: Sun Apr 01, 2007 12:47 am
snmpwalk -v 1 *.*.*.* -c public .1.3.6.1.4.1.311.1.1.3.1.1.7.1.14
SNMPv2-SMI::enterprises.311.1.1.3.1.1.7.1.14.4.73.100.108.101 = INTEGER: 4
SNMPv2-SMI::enterprises.311.1.1.3.1.1.7.1.14.6.83.121.115.116.101.109 = INTEGER: 67
I tried many times and get one or two results. .1.3.6.1.4.1.311.1.1.3.1.1.7.1.14.4.106.97.118.97 isn't included . It should be no MIB in net-snmp. But it don't impact query by OID.
SNMPv2-SMI::enterprises.311.1.1.3.1.1.7.1.14.4.73.100.108.101 = INTEGER: 4
SNMPv2-SMI::enterprises.311.1.1.3.1.1.7.1.14.6.83.121.115.116.101.109 = INTEGER: 67
I tried many times and get one or two results. .1.3.6.1.4.1.311.1.1.3.1.1.7.1.14.4.106.97.118.97 isn't included . It should be no MIB in net-snmp. But it don't impact query by OID.
-
- Cacti User
- Posts: 50
- Joined: Sun Apr 01, 2007 12:47 am
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
If the snmpwalk does not give other results, even cacti won't see them. So if your waiting for .1.3.6.1.4.1.311.1.1.3.1.1.7.1.14.4.106.97.118.97 and it doen't come up, I have no cluebenton2006 wrote:snmpwalk -v 1 *.*.*.* -c public .1.3.6.1.4.1.311.1.1.3.1.1.7.1.14
SNMPv2-SMI::enterprises.311.1.1.3.1.1.7.1.14.4.73.100.108.101 = INTEGER: 4
SNMPv2-SMI::enterprises.311.1.1.3.1.1.7.1.14.6.83.121.115.116.101.109 = INTEGER: 67
I tried many times and get one or two results. .1.3.6.1.4.1.311.1.1.3.1.1.7.1.14.4.106.97.118.97 isn't included . It should be no MIB in net-snmp. But it don't impact query by OID.
Reinhard
Who is online
Users browsing this forum: No registered users and 0 guests