adding script to EasySTAT.sh

32 views
Skip to first unread message

blake

unread,
Mar 18, 2014, 8:20:07 AM3/18/14
to dim...@googlegroups.com
Him Dim

    First of all I'd like to say dim_STAT is a ver helpfull app. We have a performance problema in a Oracle RAC boxes and we a are not be able to connect directly 
so EasySTAT.sh make me crazy :-P

    However, I am trying to add new scripts to EasySTAT.sh and having a few problems. Let me tell you where the problem is:
    
In EasySTAT.sh added 

STATS="$STATS; UPTIME!/etc/STATsrv/bin/uptime.ksh %i"

The script is pretty simple:

#!/bin/ksh
LANG=C
export LANG
exec /etc/STATsrv/bin/uptime.ksh

And I run EasySTAT.sh, everything seems ok (ths file pnsibmrr3-01_data.2014_03_18.13H07.UPTIME is created) but this add on only run once. If I look into 
the file pnsibmrr3-01_data.2014_03_18.13H07.UPTIME.pid there are three pid's (this is incorrect, isn't it?) and the timer process is not running.

Please can u give a hand?

Thanks in advance.

Dimitri

unread,
Mar 18, 2014, 1:13:18 PM3/18/14
to dim...@googlegroups.com
Hi David,

there is something unclear with your script:
- from the EasySTAT.sh you're executing "uptime.ksh"
- and from the source of "uptime.ksh" you're involving again the
same uptime.ksh ?..

well, it's very easy to test that everything is working as expected:

1. create a file /etc/STATsrv/bin/test.sh :

#!/bin/ksh
LANG=C
export LANG
exec vmstat $*

2. add into EasySTAT.sh:

STATS="$STATS; TEST!/etc/STATsrv/bin/test.sh %i"

and then run EasySTAT ;-)
once you'll be sure everything is working - extend the script with any
other stuff you need..

Rgds,
-Dimitri
> --
> You received this message because you are subscribed to the Google Groups
> "dim_STAT" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dimstat+u...@googlegroups.com.
> To post to this group, send email to dim...@googlegroups.com.
> Visit this group at http://groups.google.com/group/dimstat.
> For more options, visit https://groups.google.com/d/optout.
>

blake

unread,
Mar 19, 2014, 6:17:25 AM3/19/14
to dim...@googlegroups.com
Hi there

 You are right, I put a test version of the script. But the problem is I use a command that no stay a life for a while, i mean, for example the uptime command. Accoding with you example I wrote the followin script:

$ cat /etc/STATsrv/bin/test.sh
#!/bin/ksh 
LANG=C 
export LANG 
exec uptime $* 

And when run EasyStat get this message:

##----------------------------------------------------------------
## WARNING !!!
## Cannot identify PID for command: /etc/STATsrv/bin/test.sh 5 !!!
##----------------------------------------------------------------

Reading your user's guide I found a example that think it'll work for me. This is the script am using right now:

#!/bin/ksh
LANG=C
export LANG
#exec /usr/bin/uptime

while true
do
 /usr/bin/uptime
 sleep $1
done 

With this everythings works ok. The next step will be to draw the graph with this info.

Thanks for your quick answer 

Regards.

Dimitri

unread,
Mar 19, 2014, 8:21:18 AM3/19/14
to dim...@googlegroups.com
Indeed, reading a doc with attention usually helping ;-))
have a fun! ;-))

Rgds,
-Dimitri
>> > email to dimstat+u...@googlegroups.com <javascript:>.
>> > To post to this group, send email to
>> > dim...@googlegroups.com<javascript:>.
Reply all
Reply to author
Forward
0 new messages