Get Disk Info
Get Disk Info
I have setup check_usolved_disks.php, it is executable, it is in /usr/local/nagios/libexec directory, permissions look correct (same as everything else in that directory). When I try to test it from the command line I get ./check_usolved_disks.php: /usr/bin/php^M: bad interpreter: No such file or directory. php is installed and /usr/bin/php also exists. I am new to Nagios and new to Linux so just looking for some thoughts as to what could be wrong with this. Thanks...
Re: Get Disk Info
sailci wrote:I have setup check_usolved_disks.php, it is executable, it is in /usr/local/nagios/libexec directory, permissions look correct (same as everything else in that directory). When I try to test it from the command line I get ./check_usolved_disks.php: /usr/bin/php^M: bad interpreter: No such file or directory. php is installed and /usr/bin/php also exists. I am new to Nagios and new to Linux so just looking for some thoughts as to what could be wrong with this. Thanks...
Can you check the top of the file to make sure that the shebang (#!) line isn't messed up? I've noticed bad things have happened when I try pasting occasionally.
Former Nagios Employee.
me.
me.
Re: Get Disk Info
#!/usr/bin/php
<?php
Is the top two lines. Looks right to me? when I do a which php it does return that path. I also tried php -f <path to file> --args -H localhost -C public -w90 -c 95 and it just gives me PHP usage instructions. I am obviously missing something.
Thanks...
<?php
Is the top two lines. Looks right to me? when I do a which php it does return that path. I also tried php -f <path to file> --args -H localhost -C public -w90 -c 95 and it just gives me PHP usage instructions. I am obviously missing something.
Thanks...
Re: Get Disk Info
http://stackoverflow.com/questions/1992 ... -directory
Basically you have some Windows-style line endings that are messing it up. You should be able to yum install dos2unix and run it against the file to fix it.
Basically you have some Windows-style line endings that are messing it up. You should be able to yum install dos2unix and run it against the file to fix it.
Former Nagios employee
Re: Get Disk Info
Looks like that did the trick....thank you so much