I am running this script. It is giving me an error.
Scripting Error: Script does not contain the expected parameters or is improperly formatted. 'Statistic' missing.
Output: =====================================================
perl /tmp/APM_1223501119.pl arg1 arg 2
sh: -c: line 0: unexpected EOF while looking for matching `"'
sh: -c: line 1: syntax error: unexpected end of file
Message: NOTE: Service to count the number of instances of WS Used on a Node app instance count.
Statistic:
The script looks like this:
#!/usr/bin/perl
$app_name = "Service to count the number of instances of WS Used on a Node";
$count = `/usr/bin/ps -ef | grep "/osg/eod/selector/session$" | grep -vw grep | wc -l`;
print "Message: NOTE: $app_name app instance count. \n";
print "Statistic: $count\n";
exit 0;
It is producing a string number and it needs a integer number. How can I get a number