|Syntactic Confectionery Delight|
Print subroutine problemby Shivaramakrishnan (Initiate)
|on Apr 05, 2013 at 17:21 UTC||Need Help??|
Shivaramakrishnan has asked for the
wisdom of the Perl Monks concerning the following question:
Hi , I am a newbie to perl with some bash experience.I am trying to get a monitoring script for postgres database.I was able to get the script working with no issues.But I am having problems with output form.Here is the current output that I get.
./check_postgres.pl --buffers_alloc --exclusivelock --activeconn 17212root@host:
which is to be read as 172 for buffers_alloc 1 for exclusivelock and 2 for activeconn.I would like to have my output as
./check_postgres.pl --buffers_alloc --exclusivelock --activeconn ------
Buffers_Alloc:172 Exclusive_lock:1 Active_Conn:2
root@host:That is Description:Value Description:Value followed by next line at the end. I am trying to fix this from past three days but not able to succeed.Any help is greatly appreciated.I need to get this working as soon as possible.