Hello:
We've put together a bash shell script to determine free inodes for a Ubuntu Linux volume (shown below in source code and output) but can't seem to get Solarwinds SAM to run it because its looking for a Perl script apparently. Could someone help converting this to Perl (although this looks simple we have no in-house Perl experience) or possibly there is a Perl script to do this already though searching Thwack I haven't seen anything I'm by far not an expert there. OR is there a way to run the Bash script we have written??
# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
udev 1018728 470 1018258 1% /dev
tmpfs 1021907 479 1021428 1% /run
/dev/dm-0 667808 182306 485502 28% /
none 1021907 2 1021905 1% /sys/fs/cgroup
none 1021907 4 1021903 1% /run/lock
none 1021907 1 1021906 1% /run/shm
none 1021907 2 1021905 1% /run/user
/dev/sdb1 3932160 288149 3644011 8% /opt
/dev/sda1 124496 314 124182 1% /boot
vesb-server-01c.cnxprod.com:/opt/fuse 3932160 288149 3644011 8% /opt/filestore
# more inodecount.sh
#!/bin/bash
icount=`df -i | grep /opt | awk '{print $5}'`
echo $icount | cut -c 1-$(expr `echo "$icount" | wc -c` - 2)
root@vesb-server-01c:~# ./inodecount.sh
8% 8