Sponsored Content
Top Forums Shell Programming and Scripting Looking for a return value weather smartctl is running a (short) selftest or not Post 302970286 by Chubler_XL on Monday 4th of April 2016 11:41:06 PM
Old 04-05-2016
You may have to monitor the self-test log using:

Code:
smartclt -l selftest /dev/sda

Note, the format of this log may vary from device to device so it's not a trivial exercise to produce a script that will work for all device types.
 

9 More Discussions You Might Find Interesting

1. Solaris

/rsc selftest failed ==> return code = 1

i edited the resolv.conf file, the i rebooted the machine, the following error appeard .. plz help /rsc selftest failed return code 1 Error ==> timeout on character recieved , uart port D FRU ==> plug-in card caller ==> warning diag-process-error rsc-ini-eth-test ... caller ==>... (1 Reply)
Discussion started by: mduweik
1 Replies

2. UNIX for Dummies Questions & Answers

How to verify weather it is a ebcdic file or not

Hi all, Please tell me how to verify weather it is a ebcdic file or not . I checked with file commond but it is giving like International Language text. Regards, Chaitu (0 Replies)
Discussion started by: c_chaitanya
0 Replies

3. Linux

Check weather a file is in use or not?

Hi, Hi want to check weather a file is being used by using a command or java code or shell script. So, can any body give me some idea.. Thanks Buddhika (3 Replies)
Discussion started by: cse.buddhika
3 Replies

4. Shell Programming and Scripting

Return code for parallel running threads

Hi, How to use the return code, for parallel running threads. Ex- grep pattern1 file1 file2 file3 file4 & grep pattern1 file5 file6 file7 file8 & grep pattern1 file9 file10 file11 file12 & return_code=$? if (return_code -eq 0) then echo "pattern found" else echo... (2 Replies)
Discussion started by: jitendriya.dash
2 Replies

5. Shell Programming and Scripting

Return name of running WM in bash?

While I am by habit comfortable with bash as a shell, from time to time, I find tiny reasons to believe it's a little dense. One of the things that proves it is: to date, I have not been able to get it to identify what WM it's running inside of or alongside of in an X11 kind of environment... (1 Reply)
Discussion started by: SilversleevesX
1 Replies

6. Shell Programming and Scripting

Geo Weather Challenge

Hi everybody, I'm new to these forums and this is my first post. A couple days ago I was trying to find a simple script that would return an individual's local weather conditions using I.P. based geolocation. After many failed search attempts, I began my quest to create this for myself. I have to... (0 Replies)
Discussion started by: o0110o
0 Replies

7. Shell Programming and Scripting

Return variable value from a script running in background

I have a script which runs a script in the background. Now the script running in background returns some variable value and i want to catch return value in the parent script. e.g. Parent Script : #!/bin/bash ./Back.sh & pid=$! echo "a=$a" echo "b=$b" echo "d=$((a+b))" wait $pid ... (4 Replies)
Discussion started by: Shaishav Shah
4 Replies

8. Shell Programming and Scripting

Losing carriage return (X0D) after running awk command

Hi Forum. I'm running the following awk command to extract the suffix value (pos 38) from the "AM00" record and append to the end of the "AM01" record. awk 'substr($0,13,4)=="AM00" {SUFFIX = substr($0,38,2)} substr($0,13,4)=="AM01" {$0 = $0 SUFFIX} 1' before.txt > after.txt Before.txt:... (2 Replies)
Discussion started by: pchang
2 Replies

9. Shell Programming and Scripting

How to return from background process and check if it is running or not?

Hi Team, i am executing 3 scripts in background from 1 script and i want to send a message once the script gets completed.these scripts usually takes 1 hr to complete. My sample script is below, Vi abc.sh sh /opt/data/Split_1.sh & sh /opt/data/Split_2.sh & sh /opt/data/Split_3.sh & ... (3 Replies)
Discussion started by: raju2016
3 Replies
FusionInventory::Agent::Tools::Linux(3pm)		User Contributed Perl Documentation		 FusionInventory::Agent::Tools::Linux(3pm)

NAME
FusionInventory::Agent::Tools::Linux - Linux generic functions DESCRIPTION
This module provides some generic functions for Linux. FUNCTIONS
getDevicesFromUdev(%params) Returns a list of devices, by parsing udev database. Availables parameters: logger a logger object getDevicesFromHal(%params) Returns a list of devices, by parsing lshal output. Availables parameters: logger a logger object command the exact command to use (default: /usr/sbin/lshal) file the file to use, as an alternative to the command getDevicesFromProc(%params) Returns a list of devices, by parsing /proc filesystem. Availables parameters: logger a logger object getCPUsFromProc(%params) Returns a list of cpus, by parsing /proc/cpuinfo file Availables parameters: logger a logger object file the file to use (default: /proc/cpuinfo) getInfoFromSmartctl(%params) Returns some information about a drive, using smartctl. Availables parameters: logger a logger object device the device to use file the file to use getInterfacesFromIfconfig(%params) Returns the list of interfaces, by parsing ifconfig command output. Availables parameters: logger a logger object command the command to use (default: /sbin/ifconfig -a) file the file to use getInterfacesFromIp(%params) Returns the list of interfaces, by parsing ip command output. Availables parameters: logger a logger object command the command to use (default: /sbin/ip addr show) file the file to use perl v5.14.2 2012-06-25 FusionInventory::Agent::Tools::Linux(3pm)
All times are GMT -4. The time now is 09:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy