- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to agregate data from various outputs to 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
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
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
12-17-2019 12:19 AM
12-17-2019 12:19 AM
How to agregate data from various outputs to one single file
Hi
I have a shell script that ruins on multiple servers, and gives me the following output:
Filesystem: / mounted [ OK ]
Filesystem: /stand mounted [ OK ]
Filesystem: /tmp mounted [ OK ]
Filesystem: /home mounted [ OK ]
Filesystem: /opt mounted [ OK ]
Filesystem: /usr mounted [ OK ]
Filesystem: /var mounted [ OK ]
Uptime : 6:30am up 4 days, 18:35, 1 user, load average: 0.01, 0.01, 0.01
I/O related logs in the syslog.log file :
=========================================
LVM related logs in the syslog.log file :
=========================================
Warnings in logs:
=================
Errors in logs:
===============
But this is for a single server, and I want to have one single file with all this information but for all the servers like:
server 1:
mounted file systems : ok
.......
......
server 2:
mounted file systems: no
......
......
Can I have some ideas in how to approach this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2019 06:53 PM
12-17-2019 06:53 PM
Re: How to agregate data from various outputs to one single file
> Can I have some ideas in how to approach this
Write a shell script? This is a pretty elementary task. How much
don't you know? Web search for terms like, say:
shell script tutorial
Make some files:
pro3$ cat file_1
file1 a
file1 b
file1 c
pro3$ cat file_2
file2 a
file2 b
file2 c
Create an output file, and append things to it:
pro3$ touch all
pro3$ echo 'server 1:' >> all
pro3$ cat file_1 >> all
pro3$ echo 'server 2:' >> all
pro3$ cat file_2 >> all
pro3$ cat all
server 1:
file1 a
file1 b
file1 c
server 2:
file2 a
file2 b
file2 c
Where will you get the server names like "server 1"? Where will the
individual report files be?
Presumably, a loop with some variables in the "echo" and "cat"
commands would make more sense than a long line of "echo" and "cat"
commands with constant arguments.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2019 11:39 PM
12-17-2019 11:39 PM
Re: How to agregate data from various outputs to one single file
There's already a tool for that - pdsh... see this post for a few more details...
The manual referenced there has moved to here:
https://support.hpe.com/hpsc/doc/public/display?docLocale=en_US&docId=emr_na-c01920477&withFrame
I am an HPE Employee