- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- script problem
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2002 11:04 PM
04-05-2002 11:04 PM
We have glnceplus installed for our superdome servers. Sendmail is also configured for these servers. I want to automate the glace o/p using cron so that we can receive it for each 10 min duration. Following is the workaround I have done but some how it's not fuctioning.
1) Wrote a script glance1 [content of which is attached herewith"
2) done following entries in crontab file :-
0,10,20,30,40,50 * * * * /shripad/scripts/glance1
1,11,21,31,41,51 * * * * mailx -s CPU UTILIZATION ON DBNODE as on $2$3$6 shripad.patkar@seepz.tcs.co.in < /shripad/logs/glancelog/glance$4 $2$3.log
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2002 11:10 PM
04-05-2002 11:10 PM
Re: script problem
cron is executing the script at ten minute intervals but nothings is being passed to the script to process.
In the script you have variables $2... these are meant to hold some info passed to the script at execution time.
cheers
John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2002 11:38 PM
04-05-2002 11:38 PM
SolutionI looked into what your trying to achieve and I think I have better way to this.
forget cron
run glance in background constantly reporting to a file every ten minutes.
echo "runq=" > /tmp/glance.syntax
/opt/perf/bin/glance -advisor-only -syntax /tmp/glance/syntax -j 600 > /tmp/glance.output &
this will now do what you need and if you man on glance it will tell you about different options you may wish to include in the glance.syntax file.
good luck
John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2002 11:52 PM
04-05-2002 11:52 PM
Re: script problem
I think this will solve my purpose. But how to enable this at system startup so that even after reboot it will be there. Do I have to prepare a RC script or glance has an option. Also what is "runq" and one more doubt is "shall I have to invoke this command only once from the command prompt or?"
Regards
deepak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2002 11:58 PM
04-05-2002 11:58 PM
Re: script problem
the runq is not doing anything I just wanted to prove the syntax file got used.
I will test on my system the best way to ensure this runs each boot time and get back to you shortly.
John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2002 01:34 AM
04-06-2002 01:34 AM
Re: script problem
I am able to get the output but it contains junk characters, don't know how to get rid of this. Typed below is the output which I have set to receive to a mail id with cron daemon's help.
[?1h [0m [2J [H [48B [;7mProcList [m [;7mCPU Rpt [m [;7mMem Rpt [m [;7mDisk Rpt [m [61C [;7mNextKeys [m [;7mSlctProc [m [;7m Help [m [;7m Exit [2J [H [mB3692A GlancePlus C.03.50.00 15:01:43 dbnode 9000/800 [56CCurrent Avg High
------------------------------------------------------------------------------------------------------------------------------------
[4;26H [;7mInitializing... [m [3B
------------------------------------------------------------------------------------------------------------------------------------
[41B [;7mProcList [m [;7mCPU Rpt [m [;7mMem Rpt [m [;7mDisk Rpt [m [61C [;7mNextKeys [m [;7mSlctProc [m [;7m Help [m [;7m Exit [m [1;40H4 [2B
CPU Util [;7;1mS S [;7mA [;7;1mU U [m [59C| 43% 43% 43%
Disk Util [;7;1mF F [;7mV [m [75C| 7% 7% 7%
Mem Util [;7;1mS S [;7mU U [;7;1mB B [m | 88% 88% 88%
Swap Util [;7;1mU U [;7mR R [m [56C| 46% 46% 46%
[8;59HCPU BY PROCESSOR [46CUsers= 12 [B
CPU State Util LoadAvg(1/5/15 min) CSwitch Last Pid [B
-------------------------------------------------------------------------------- [B
1 Enable 29.8 0.7/ 0.7/ 0.7 [7C851 23174 [B
12 Enable 52.4 0.5/ 0.7/ 0.7 [6C1777 25992 [B
4 Enable 45.2 0.3/ 0.5/ 0.6 [6C1180 1254 [B
15 Enable 34.7 0.8/ 0.7/ 0.7 [6C1842 26042 [B
0 Enable 35.5 0.9/ 0.8/ 0.8 [7C778 16535 [B
11 Enable 68.5 1.0/ 0.8/ 0.8 [6C2459 25988 [B
5 Enable 16.1 0.5/ 0.6/ 0.6 [6C1058 4666 [B
3 Enable 38.7 0.8/ 0.6/ 0.6 [6C2374 4666 [B
7 Enable 80.6 0.4/ 0.5/ 0.6 [6C1080 26035 [B
8 Enable 28.2 0.6/ 0.6/ 0.7 [6C1267 18067 [48;121HPage 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2002 01:51 AM
04-06-2002 01:51 AM
Re: script problem
what happens if you "cat" the output file on the unix server ?
I crashed my server testing a few things but will be back up and running shortly.
have you done a man on glance there's lots of help in the pages I suspect your last problem is we need to format the output into an ascii format.
back soon
John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2002 01:55 AM
04-06-2002 01:55 AM
Re: script problem
If I do "cat glance.out" the output is :-
==================== GlancePlus Fatal Error =====================
Version: B3692A GlancePlus C.03.50.00
User : root Date: Sat Apr 6 15:05:19
File : /crm/gp/source/glance/terminal.c Line: 1319
System : dbnode B.11.11 9000/800
Glance terminated with error code 5.
======================================================================
===================== GlancePlus Non-Fatal Error =====================
Version: B3692A GlancePlus C.03.50.00
User : root Date: Sat Apr 6 15:05:20
File : /crm/gp/source/glance/glance.c Line: 976
System : dbnode B.11.11 9000/800
Unable to perform functions on devices.
======================================================================
===================== GlancePlus Non-Fatal Error =====================
Version: B3692A GlancePlus C.03.50.00
User : root Date: Sat Apr 6 15:05:20
File : /crm/gp/source/glance/glance.c Line: 978
System : dbnode B.11.11 9000/800
Unable to perform functions on devices.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2002 02:07 AM
04-06-2002 02:07 AM
Re: script problem
I have my system back now the file created is in fact a screen dump ready for a printer. There appears to be no options to have an ascii output that I can see.
John.