How to do safe and graceful Measureware service restart in HPUX

Measureware service is native utility to HPUX for performance measurement. It is responsible to collect system utilization data in background. Measureware agent mwa runs in background and stores data in logfiles called datafiles.  If you attempt measureware service restart without moving logfiles then it will overwrites current files and all historic data is on toss. Hence you need to stop it then move datafiles to another location and then start it. In this sequence you prompt agent to create new blank datafiles to save data.

You can view current status of all measureware services using below command :
If any of the component is not running or having issues then it may calls for measureware service restart. Lets see process to graceful shutdown and start of measureware services in HPUX.

1. Stop mwa
Stop all measureware services with single command as below :
As you can see in above output ttd is left running by command. You need to kill it using below command :
Also, mideamon still runs after above command. You can terminate it using :
These three commands collectively shuts off everything related to measureware services. You can confirm if midaemon, ttd and scopeux are down with status command again :

This ensures you can proceed with log movement before starting mwa again.

2. Log movement
Datafiles (all starts with log) resides in /var/opt/perf/datafiles directory. List of datafiles is as below :
Now move current datafiles to different directory. You can use below small inline scripts to do this or you can manually move them one by one.
Make sure you copied datafiles to destination correctly and proceed to start services again.

3. Start mwa
Start it using below command :
Observe while shutting down we used three commands for shutting different components but while starting up it came up with single command. You can check status with mwa status all command to make sure all components are started. This pretty much sums up how to do safe and graceful measureware service restart.

All examples on this post are from machine running HPUX 11.31. Let us know if you have any queries, suggestions, corrections in comments.
SHARE

sangeethakumar

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment