- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Script writing to create files of important o...
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
Discussions
Discussions
Forums
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
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
тАО11-13-2001 11:51 AM
тАО11-13-2001 11:51 AM
Script writing to create files of important outputs
ioscan...
bdf
vgdisplay
lanscan
swlist
.
.
.
I'm just looking for something to use as a basis to work off of....any help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-13-2001 12:01 PM
тАО11-13-2001 12:01 PM
Re: Script writing to create files of important outputs
#!/sbin/sh
FILE=/tmp/outputfilename
echo "ioscan output" >> $FILE
ioscan >> $FILE
echo "" >> $FILE
echo "bdf output" >> $FILE
bdf >> $FILE
echo "" >> $FILE
echo "vgdisplay output" >> $FILE
vgdisplay -v >> $FILE
echo "" >> $FILE
echo "lanscan output" >> $FILE
lanscan >> $FILE
echo "" >> $FILE
echo "swlist output" >> $FILE
swlist -l product >> $FILE
mailx -s "Output from commands" yourname@somewhere.com < $FILE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-13-2001 12:02 PM
тАО11-13-2001 12:02 PM
Re: Script writing to create files of important outputs
anycommand >> /var/tmp/sysinfo.txt
anothercommand >> /var/tmp/sysinfo.txt
mailx -s 'Sys Info' you@domain.com < /var/tmp/sysinfo.txt
Put that in a script, make the script executable, then run the script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-13-2001 12:06 PM
тАО11-13-2001 12:06 PM
Re: Script writing to create files of important outputs
The hp porting site has a script named sysinfo.sh This will do whatever information you required from the servers. this script also gives you output in html format.
Here is the adress:
http://hpux.cs.utah.edu/hppd/
Once the file created (/tmp) you can send that file as an attachment in mail or do a ftp.
Goodluck,
-USA..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-13-2001 12:17 PM
тАО11-13-2001 12:17 PM
Re: Script writing to create files of important outputs
You will never know how you got along without scripting before! As far a script, follow Patrick's format and you can't go wrong. We can't know what is important to you however.
You know what you want to see, so find the command to give you that information and plug it into the script.
Happy Scripting,
C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-13-2001 01:04 PM
тАО11-13-2001 01:04 PM
Re: Script writing to create files of important outputs
Attached is a good collector script I got from another thread quit a while ago. Check it out, I think it does what you need.
...jcd...