- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Shell script help wanted
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
03-24-2004 09:26 AM
03-24-2004 09:26 AM
Shell script help wanted
Can somebody please help me what kind of scripting language I should use? Should it be perl or Shell scripting? I think there is also some "awk" work. The shell that I am using is bourne/hp-ux. So, how do I know if bourne supports all the features? There could be some more tasks in future. What is the best way to implement it? Some of the portions may be reuseable. Could you please comment if there is anything that cannot be done (from below)?
Here are some tasks:
Monitor disk space, Notify (via email) when something wrong (bdf -bi)
Monitor free blocks via unix, Notify (via email)when something wrong (df -k)
select count(*) from a few tables in oracle, notify (via email)when something wrong
Changing file name extension (file name extension has a number that needs to be calculated)
Moving files to a different directory
Monitor processes .. ( 3 processes must always be running otherwise notify (via email))
Search a file for keywords (Need to monitor the content of file)
Creating a file
killing processes
su as root, (some notifications depending on condition)
issue a command
check date and time on processes
issue ls -l, if files with .XXX ext'n are found, notify
change dir, if files older than today, notify
I would greatly appreciate any suggestions/comments/questions from you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2004 09:29 AM
03-24-2004 09:29 AM
Re: Shell script help wanted
I'm attaching a tar file with a few starter scripts that will give you a base with which to start your process.
See attachment.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2004 09:30 AM
03-24-2004 09:30 AM
Re: Shell script help wanted
Check out this man's past questions:
http://forums1.itrc.hp.com/service/forums/publicProfile.do?userId=BR180643&forumId=1
He has three threads filled with scripts that sysadmins can't live without.
Almost everything you are looking for is in those threads.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2004 09:39 AM
03-24-2004 09:39 AM
Re: Shell script help wanted
The answer to your question probably a mixture of all three. If I were forced to choose only one my answer would be Perl but the learning curve is the steepest.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2004 11:54 PM
03-24-2004 11:54 PM
Re: Shell script help wanted
This is a cool site
http://www.shelldorado.com/
Heiner's SHELLdorado
SHELLdorado - your UNIX shell scripting resource
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2004 12:10 AM
03-25-2004 12:10 AM
Re: Shell script help wanted
http://forums1.itrc.hp.com/service/forums/parseCurl.do?CURL=%2Fcm%2FQuestionAnswer%2F1%2C%2C0x026250011d20d6118ff40090279cd0f9%2C00.html&admit=716493758+1080220098416+28353475
http://forums1.itrc.hp.com/service/forums/parseCurl.do?CURL=%2Fcm%2FQuestionAnswer%2F1%2C%2C0x836cc1c4ceddd61190050090279cd0f9%2C00.html&admit=716493758+1080220148545+28353475
Regards,
Jean-Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2004 08:37 PM
03-31-2004 08:37 PM
Re: Shell script help wanted
For instance, your performance is best if you write it efficiently in C. But there a fewer people available to maintain C programs nowadays.
And writing as a shell script is probably on of the slowest solutions, but is more portable across hardware and unix versions. And since the commands in a shell script are the same as on the prompt, they are more accessible by other sysadmins.
So, if you're the only one maintaining the scripts in the coming years, your choice is free. But if you are part of a sysadmin organization and others have to maintain and understand what you have done, your choice is limited to the general knowledge within the organization.
As for the monitoring it self: I would go for specific programs for the specific monitoring, perhaps with a general include file containing functions that make the writing more easy. Then you can start those programs from cron, for instance.
Just my 2 cents.