Focal Point
[SOLVED] Reseting Statistics in webconsole

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4647050695

December 29, 2010, 08:48 AM
Todd Jones
[SOLVED] Reseting Statistics in webconsole
I need a way to restart the application server everyday at a specific time. I want to do the same thing as going into the webconsole and under Workspace clicking on Restart. This is done to reset the Statistics. I was looking for something to put into a fex in which I could then schedule in Report Caster…maybe a setting or a UNIX command?

Any help would be appreciated!

This message has been edited. Last edited by: Kerry,


7.6.8
UNIX
FOCUS,HTML,PDF,EXCEL.
December 29, 2010, 09:50 AM
jbanas6
create a bat script that has the following code in it. you can then have the fex do a call to this bat -DOS CMD

 
Net STOP "WebFocus 76 Server"

Net START "WebFocus76 server"


have reportcaster and/or windows scheduled tasks run this bat daily at the time


WF 7.6.10 /IIS 6/ JBoss Enterprise 4.3
Windows XP SP 2/Windows 2003 Server
MVS 7.3.3
December 29, 2010, 03:38 PM
Waz
As this is UNIX, I would suggest a CRON job.

Which statistics are you wanting to reset ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

December 29, 2010, 03:49 PM
Todd Jones
We want to reset the following:
Conn Total, Conn Completed, Sessions Now, Sessions Total, Res Fails, Sec Fails, Focus Errors, Avg Rsp Time

I think either will work.
Thanks so much!


7.6.8
UNIX
FOCUS,HTML,PDF,EXCEL.
December 30, 2010, 09:24 AM
<JG>
As you are on UNIX you should have a job in init.d and links in the appropriate rcn.d directories.

If you just want the statistics resetting you can but I would go for the server restart approach
as this will also clear up any memory and orphan edatemp work directories created by agent crashes etc.

As Waz says a simple cron job will do the task and can be scheduled for any convienient time
such as 3:00am.

Your UNIX admin should be able to do this standing on his head

but basically

edit the cron schedule by entering the following at a unix console prompt

crontab -e

to simply reset the statistics add the following to the file

0 3 * * * /init.d/WebFOCUS_START -reset >/dev/null

to restart the server add the following to the file

0 3 * * * /init.d/WebFOCUS_START -restart >/dev/null

Where WebFOCUS_START is the name of the task in init.d

the >/dev/null sends standard messages down the black hole.

However if you want to be informed of any errors generated precede the cron job with a mailto

for example

MAILTO=your email address @whereever.com
0 3 * * * /init.d/WebFOCUS_START -reset >/dev/null


or


MAILTO=your email address @whereever.com
0 3 * * * /init.d/WebFOCUS_START -restart >/dev/null


for it to work the startup task in init.d should look something like this
(change EDA_HOME and WF_USER for your values)

  
RETVAL=$?
EDA_HOME=/usr/iadmin/ibi/srv76
WF_USER=iadmin

case "$1" in
 start)
        if [ -f $EDA_HOME/wfs/bin/edastart ];
          then
            /bin/su - $WF_USER -c "$EDA_HOME/wfs/bin/edastart -start"
        fi
;;
 stop)
        if [ -f $EDA_HOME/wfs/bin/edastart ];
          then
            /bin/su - $WF_USER -c "$EDA_HOME/wfs/bin/edastart -stop"
        fi
        ;;
restart)
        if [ -f $EDA_HOME/wfs/bin/edastart ];
          then
            /bin/su - $WF_USER -c "$EDA_HOME/wfs/bin/edastart -restart"
        fi
        ;;
reset)
        if [ -f $EDA_HOME/wfs/bin/edastart ];
          then
            /bin/su - $WF_USER -c "$EDA_HOME/wfs/bin/edastart -reset"
        fi
        ;;
status)
        if [ -f $EDA_HOME/wfs/bin/edastart ];
          then
            /bin/su - $WF_USER -c "$EDA_HOME/wfs/bin/edastart -status"
        fi
        ;;

 *)
 echo $"Usage: $0 {start|stop|restart|reset|status}"
exit 1

This message has been edited. Last edited by: <JG>,
December 30, 2010, 03:40 PM
Waz
Awesome, JG, I'll have a good look at this.

Good One


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!