- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Script to execute smartctl.
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
06-27-2011 12:06 PM - edited 06-27-2011 03:00 PM
06-27-2011 12:06 PM - edited 06-27-2011 03:00 PM
Script to execute smartctl.
Hello Folks,
I am new in Linux and working as a Junior Admin. One of the task I have is to runt SMART utility every night and mail the list of systems with and drives with errors only Admin team.
I will be running the following command on all 200 Systems for all hard drives and the output will go to a file.
If there is any other solution please help me out.
# smartctl -q errorsonly -H -A /dev/XXX >> StatusLog
The output in the file is also having all the name of systems and drive with no errors.
How can I extract the SYSTEM NAME and DRIVE NAME with errors only and output to a different file ,, eg (Error_File) ???????????
FOR EXAMPLE ..... I ran the command on 3 system only but only NODE-1 is showing errors on both drives.
--------------------------- NODE-1 ---------------------------
Disk /dev/sda in NODE-1
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
190 Airflow_Temperature_Cel 0x0022 042 039 045 Old_age Always FAILING_NOW 58 (255 255 59 56)
Disk /dev/sdb in NODE-!
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
190 Airflow_Temperature_Cel 0x0022 040 036 045 Old_age Always FAILING_NOW 60 (255 255 61 58)
----------------------------NODE-2 ---------------------------
Disk /dev/sda in NODE-2
--------------------------- NODE-3 ---------------------------
Disk /dev/hde in NODE-3
Disk /dev/sda in NODE-3
Disk /dev/sdb in NODE-3
Disk /dev/sdc in NODE-3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2011 10:35 PM
06-29-2011 10:35 PM
Re: Script to execute smartctl.
Hello.
Wouldn't it be easier to use 'smartd' instead and let it report to you?
Regards,
Goran