What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
300.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Are there SSH script for monitoring AIX 7.1 Disk usage ?

Votes:

0

Your Vote:

Up

Down

Are there SSH script for monitoring AIX 7.1 Disk usage (eg. / , /home , /opt , /usr , /u01)?

aix disk-usage ssh

Created on Jan 24, 2014 1:47:32 AM by  icbcit (0) 1



2 Replies

Votes:

0

Your Vote:

Up

Down

Hi,
AIX is not officially supported by PRTG so there are no out of the box sensors. However, the SSH Script Sensors should work with AIX as well as SNMP Library Sensors in case you have the correct MIB files.
Best regards

Created on Jan 24, 2014 5:47:24 AM by  Konstantin Wolff [Paessler Support]



Votes:

0

Your Vote:

Up

Down

I wrote the following script which when called as script partition will give you the percent free space. By adjusting $warn and $alarm you can adjust what it considers a warning or alarm number. I expect I'll add $warn and $alarm as additional parameters $2 and $3 in the future, but this gets me started at least tracking usage.

I have named it /var/prtg/scripts/drivespace. In PRTG you must fill in the arguments field with a value like var. No leading /. You can also put the filesystem instead of the moint point like dev/hd4 to get the / partition. I know that's a bit messy, but gets the job done. If you make improvements please post. :-)

#!/bin/ksh 
# Determine percent free space on an AIX partition

# based on PRTG example script 
# https://kb.paessler.com/en/topic/39513-is-there-a-shell-script-example-for-prtg-s-ssh-script-sensor

# The first and only argument should be the partition starting without a /

warn=85
alarm=90
part=""
one=$1

get_part(){
        if [ "$one" ]; then
               part="/"$one
        else
                echo "4:0:No partition argument found for script"
                exit
        fi
}

check_drivespace(){
        #Find percentage used of partitions $part on AIX
        percent=`df -v $part | grep "/"|awk '{print $6}'|cut -f 1 -d %`

        if [ "$percent" -gt "$alarm" ] ; then #Alarm
                echo "2:$percent:$part Space Very Low"
        elif [ "$percent" -gt "$warn" ] ; then  #Warning
                echo "1:$percent:$part Space Low"
        else #We're all good, nothing to see here.
                echo "0:$percent:$part Normal"
        fi
}

get_part
check_drivespace

[February 3rd 2016] Notes from Paessler Support
PRTGs SSH framework doesn't play well with AIX and might lead to crashes of the sshd process because AIX doesn't close the sessions properly. Please use any SSH sensor with caution on AIX boxes. We're currently implementing a new framework that might work better with it and will be available in the stable version. But AIX remains unsupported.

Created on Feb 2, 2016 11:57:01 PM by  Josiah Ritchie (120) 1 1

Last change on Feb 3, 2016 7:11:58 AM by  Stephan Linke [Paessler Support]



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.