Listing 3: Linux System
#!/bin/ksh
#
# Class: LinuxSystem
####################################################################
## Construct from Base class first
. UnixSystem $1
### _GetLoad()#########################################################
eval "${ObjectId}_GetLoad() {
LoadString=\$($RCMD $ObjectId 'uptime')
LoadString=\${LoadString##*:}
print \$LoadString ## Write to STDOUT
## now set numeric variable
LoadString=\${LoadString%%,*}
${ObjectId}_LAVG=\${LoadString%%.*}
if (( ${ObjectId}_LAVG = 0));then
${ObjectId}_LAVG=1
fi
}"
# End of File
|