LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-09-2010, 07:41 AM   #16
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332

Quote:
Originally Posted by srrijith View Post
what is the equivalent of iostat –E in linux ( it display all device error statics).
Linux which am using dosent support iostat -E
Why didn't you say that in the first place? This is the first post in which you made a clear statement about what you are trying to achieve. Now we can begin to help you. That's all that we want.

You can get raw error reports for different types of devices using sar. You do not need to have the sar data collector running if you just want to view system information that is happening right now. Then you can use the sar command line utility to report device errors for different classes of devices. Here are a few examples.

This example will show network device errors.
Code:
sar -n EDEV
This example will show IPv4 errors.
Code:
sar -n EIP
This example will show ICMP errors.
Code:
sar -n EICMP
I got all of these examples from the man page for sar. There are numerous other device error reports available in sar.

These error reports show raw numbers, not percentages. Now that you can collect the data you will (probably) have to create your own function for calculating percentages/rates.

You should be able to get awk to do the parsing and calculations.

Last edited by stress_junkie; 12-09-2010 at 08:38 AM.
 
1 members found this post helpful.
Old 12-09-2010, 07:18 PM   #17
srrijith
LQ Newbie
 
Registered: Dec 2010
Posts: 11

Original Poster
Rep: Reputation: 0
dmesg with which option displays all device error statistics as iostat -E does .. any idea ?
 
Old 12-09-2010, 07:51 PM   #18
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,799

Rep: Reputation: 4167Reputation: 4167Reputation: 4167Reputation: 4167Reputation: 4167Reputation: 4167Reputation: 4167Reputation: 4167Reputation: 4167Reputation: 4167Reputation: 4167
Quote:
Originally Posted by srrijith View Post
dmesg with which option displays all device error statistics as iostat -E does .. any idea ?
No options, you look in the file for any errors.

You can also pay attention, since folks are giving you answers, like stress_junkie did with the sar command. Try reading the man pages.
 
Old 12-09-2010, 11:01 PM   #19
srrijith
LQ Newbie
 
Registered: Dec 2010
Posts: 11

Original Poster
Rep: Reputation: 0
any idea from which directory and file iostat -E commands reads the device error statistics details for displaying as below

iostat -En
c0t0d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Model: ST3120026A Revision: 8.01 Serial No: 3JT4H4C2
Size: 120.03GB <120031641600 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0
c0t2d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: LITE-ON Product: COMBO SOHC-4832K Revision: O3K1 Serial No:
Size: 0.00GB <0 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0
 
Old 12-10-2010, 04:48 AM   #20
genderbender
Member
 
Registered: Jan 2005
Location: US
Distribution: Centos, Ubuntu, Solaris, Redhat
Posts: 396

Rep: Reputation: 31
Quote:
Originally Posted by srrijith View Post
any idea from which directory and file iostat -E commands reads the device error statistics details for displaying as below

iostat -En
c0t0d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Model: ST3120026A Revision: 8.01 Serial No: 3JT4H4C2
Size: 120.03GB <120031641600 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0
c0t2d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: LITE-ON Product: COMBO SOHC-4832K Revision: O3K1 Serial No:
Size: 0.00GB <0 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0
Your asking a different question now - strace or truss will show you the system calls. If you want a wrapper script you don't need to find out which inidividual line of code gets the errors; a wrapper script is a script which runs a seperate script, you've been given a good example already. You need to specify exactly what you need help with?

1. An alternative to iostat in linux (an answer to this has already been provided).
2. A way to call iostat from within your own script (this has been provided already).
3. Your own script with the calls that the unix version of iostat uses to grab it's data (nobody will help you with this as it's pointless and impossibly hard).
4. More assistance with exactly how iostat works.
5. A way to get the same data as iostat provides (dmesg wont reaaaally do this).

Last edited by genderbender; 12-10-2010 at 04:49 AM.
 
Old 12-10-2010, 07:30 AM   #21
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,799

Rep: Reputation: 4167Reputation: 4167Reputation: 4167Reputation: 4167Reputation: 4167Reputation: 4167Reputation: 4167Reputation: 4167Reputation: 4167Reputation: 4167Reputation: 4167
Quote:
Originally Posted by srrijith View Post
any idea from which directory and file iostat -E commands reads the device error statistics details for displaying as below
Yes, and we've told you several times. Again, PAY ATTENTION to what folks are posting. Try reading the man pages for programs. Posting the same question over and over, doesn't help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
script wrapper thread investmentbnker75 Programming 6 01-16-2010 11:48 PM
Wrapper script for alienBob's rsync_slackware_patches.sh ? Yalla-One Slackware 4 12-10-2009 07:18 AM
Bash: how to write a wrapper script? J_Szucs Programming 0 01-29-2005 05:50 PM
Wrapper needed for BASH Script outspoken Programming 0 01-12-2005 09:04 AM
server wrapper script yapp Programming 2 08-02-2003 11:09 AM


All times are GMT -5. The time now is 02:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration