AS400 CPU Utilization
Moderators: Developers, Moderators
Template?
I don't suppose you could export a template, or provide the OIDs you used for those graphs...
- fmangeant
- Cacti Guru User
- Posts: 2345
- Joined: Fri Sep 19, 2003 8:36 am
- Location: Sophia-Antipolis, France
- Contact:
Hi
I'm using these OIDs to graph AS/400 :
I'm using these OIDs to graph AS/400 :
- .1.3.6.1.2.1.25.1.5.0 (hrSystemNumUsers) for logged in users
- .1.3.6.1.2.1.25.1.6.0 (hrSystemProcesses) for running processes
- .1.3.6.1.4.1.2.6.4.5.1.0 for CPU usage
- hrStorageSize and hrStorageUsed for disk usage (with index=1)
- .1.3.6.1.2.1.25.2.2.0 (hrMemorySize) for memory size, and a script which get the index of memory usage in hrStorageAllocationUnits
[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]
[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]
-
- Posts: 1
- Joined: Wed Aug 16, 2006 8:19 am
- Location: Middle of States
I thought that I would post the template I have. It needs work still, but it might be a place for someone to start.
- Attachments
-
- as400-cacti.xml
- Cacti Template for AS/400
- (174.25 KiB) Downloaded 1631 times
Here are some that I use - AS400
I wish I could get more from the As400// num jobs I haven't figured out how to use the storage OID's to get Hard drive space graphs etc...
- Attachments
-
- cacti_graph_template_as400_cpu_utilization.xml
- (10.22 KiB) Downloaded 1163 times
-
- cacti_graph_template_as400_numusers_sessions.xml
- (9.9 KiB) Downloaded 1322 times
-
- cacti_graph_template_as400_ram_total.xml
- (10.23 KiB) Downloaded 1508 times
-
- cacti_graph_template_as400_total_processes.xml
- (9.9 KiB) Downloaded 1295 times
- fmangeant
- Cacti Guru User
- Posts: 2345
- Joined: Fri Sep 19, 2003 8:36 am
- Location: Sophia-Antipolis, France
- Contact:
Re: Here are some that I use - AS400
For memory, I'm using this quick and dirty script :spoonman wrote:I wish I could get more from the As400// num jobs I haven't figured out how to use the storage OID's to get Hard drive space graphs etc...
Code: Select all
$ cat get-as400-memory.sh
#!/bin/sh
IP=$1
COMMUNITY=$2
SNMP_VERSION=$3
MACHINE=$4
# RAM total size
RAM_SIZE=`snmpwalk -v $SNMP_VERSION -c $COMMUNITY $IP hrMemorySize.0 | awk '{ print $(NF-1) }'`
RAM_SIZE=`expr $RAM_SIZE`
# RAM used
NB_ELEMENTS=`snmpwalk -v $SNMP_VERSION -c $COMMUNITY $IP hrStorageIndex | awk '{ print $NF }' | tail -n 1`
RAM_USED=0
for i in `seq 1 $NB_ELEMENTS`; do
TYPE_ELEMENT=`snmpwalk -v $SNMP_VERSION -c $COMMUNITY $IP hrStorageDescr.$i | awk '{ print $NF }'`
if [ "$TYPE_ELEMENT" != "RAM" ]; then
continue
fi
BLOCK_SIZE=`snmpwalk -v $SNMP_VERSION -c $COMMUNITY $IP hrStorageAllocationUnits.$i | awk '{ print $(NF-1) }'`
NB_BLOCKS_USED=`snmpwalk -v $SNMP_VERSION -c $COMMUNITY $IP hrStorageUsed.$i | awk '{ print $NF }'`
RAM_USED=`expr $NB_BLOCKS_USED \* $BLOCK_SIZE`
TOTAL_RAM_USED=`expr $TOTAL_RAM_USED + $RAM_USED`
done
TOTAL_RAM_USED=`expr $TOTAL_RAM_USED / 1024`
RAM_FREE=`expr $RAM_SIZE - $TOTAL_RAM_USED`
echo "valeur1:$RAM_FREE valeur2:$RAM_SIZE"
[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]
[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]
- fmangeant
- Cacti Guru User
- Posts: 2345
- Joined: Fri Sep 19, 2003 8:36 am
- Location: Sophia-Antipolis, France
- Contact:
I've created a data input method which runs a script, and gets 2 results in return.
[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]
[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]
OS400 5.3 RAM script
I had to prowl around with getif to sniff out the OIDs and changed the behavior of the awks a little, but...
This seems to work with OS/400 5.3, on Fedora Core 4 as the cacti host. I'm still trying to get everything plumbed together and actually make a graph, however...
NET-SNMP version: 5.3.1, FWIW.
This seems to work with OS/400 5.3, on Fedora Core 4 as the cacti host. I'm still trying to get everything plumbed together and actually make a graph, however...
NET-SNMP version: 5.3.1, FWIW.
Code: Select all
#!/bin/sh
IP=$1
COMMUNITY=$2
SNMP_VERSION=$3
MACHINE=$4
# RAM total size
#RAM_SIZE=`snmpwalk -v $SNMP_VERSION -c $COMMUNITY $IP hrMemorySize.0 | awk '{ print $(NF-1) }'`
RAM_SIZE=`snmpwalk -v $SNMP_VERSION -c $COMMUNITY $IP .1.3.6.1.2.1.25.2.2 | awk '{ print $(NF) }'`
RAM_SIZE=`expr $RAM_SIZE`
# RAM used
#NB_ELEMENTS=`snmpwalk -v $SNMP_VERSION -c $COMMUNITY $IP hrStorageIndex | awk '{ print $NF }' | tail -n 1`
NB_ELEMENTS=`snmpwalk -v $SNMP_VERSION -c $COMMUNITY $IP .1.3.6.1.2.1.25.2.3.1.1 | awk '{ print $NF }' | tail -n 1`
RAM_USED=0
for i in `seq 1 $NB_ELEMENTS`; do
#TYPE_ELEMENT=`snmpwalk -v $SNMP_VERSION -c $COMMUNITY $IP hrStorageDescr.$i | awk '{ print $NF }'`
TYPE_ELEMENT=`snmpwalk -v $SNMP_VERSION -c $COMMUNITY $IP .1.3.6.1.2.1.25.2.3.1.3.$i | awk '{ print $(NF-1) }'`
if [ "$TYPE_ELEMENT" != "\"RAM" ]; then
continue
fi
# BLOCK_SIZE=`snmpwalk -v $SNMP_VERSION -c $COMMUNITY $IP hrStorageAllocationUnits.$i | awk '{ print $(NF-1) }'`
BLOCK_SIZE=`snmpwalk -v $SNMP_VERSION -c $COMMUNITY $IP .1.3.6.1.2.1.25.2.3.1.4.$i | awk '{ print $(NF) }'`
# NB_BLOCKS_USED=`snmpwalk -v $SNMP_VERSION -c $COMMUNITY $IP hrStorageUsed.$i | awk '{ print $NF }'`
NB_BLOCKS_USED=`snmpwalk -v $SNMP_VERSION -c $COMMUNITY $IP .1.3.6.1.2.1.25.2.3.1.6.$i | awk '{ print $NF }'`
RAM_USED=`expr $NB_BLOCKS_USED \* $BLOCK_SIZE`
TOTAL_RAM_USED=`expr $TOTAL_RAM_USED + $RAM_USED`
done
TOTAL_RAM_USED=`expr $TOTAL_RAM_USED / 1024`
RAM_FREE=`expr $RAM_SIZE - $TOTAL_RAM_USED`
echo "valeur1:$RAM_FREE valeur2:$RAM_SIZE"
My D'OH! moment of the day...
Put the mib in /usr/local/share/snmp/mibs/ and changed the snmpwalk commands to include "-m all" and the (otherwise) original script now works. With "-m all" the performance is far slower than with the OIDs above...
"-m IBM-AS400-RWS-MIB.txt" errors, even with absolute path...
Put the mib in /usr/local/share/snmp/mibs/ and changed the snmpwalk commands to include "-m all" and the (otherwise) original script now works. With "-m all" the performance is far slower than with the OIDs above...
"-m IBM-AS400-RWS-MIB.txt" errors, even with absolute path...
Re: AS400 CPU Utilization
Can someone post an example of how to use the sh script to check AS/400 memory usage ?
Thanx.
Thanx.
Who is online
Users browsing this forum: No registered users and 1 guest