LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 08-16-2014, 11:12 AM   #16
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 5,387

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397

Good point! With dirty onliner, output would be like
Code:
==> linuxbox1 <==
mpath0 (3600d0230003228bc000339414edb8101) [size=10 GB][features="0"][hwhandler="0"]
\_ 3:0:0:6 sdc 8:64 [active][faulty]
==> linuxbox3 <==
mapth0 (1494554000000000000000000030000000300940111008000)
\\_ 5:0:0:0 sdh 8:112 [active][faulty]
==> linuxbox3 <==
mpath1 (3600d0230003228bc000339414edb8101) [size=10 GB][features="0"][hwhandler="0"]
\_ 3:0:0:6 sdc 8:64 [active][faulty]
But sure, it's just for fun, I would make a better script (eg with better formated output) for production use

Last edited by keefaz; 08-16-2014 at 11:14 AM.
 
Old 08-16-2014, 09:37 PM   #17
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Distribution: UBUNTU 5.10 since Jul-18,2006 on Intel 820 DC
Posts: 804

Rep: Reputation: 186Reputation: 186
Quote:
Big assumption. What about if you get "faulty" in more than one mpath[[:digit:]] for a single hostname ?. I can see lots of potential corner cases.
Host name is the outer loop and mpath the inner.

That's when mpath/mapth is encountered, it doesn't initialize H in my example (post #12).

Incidentally, do you get the "faulty" message when prio=1 isn't enabled?

OK
 
Old 08-17-2014, 09:52 PM   #18
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,374

Rep: Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198
Someone could make a small python program either with or without compiler added in.

I read the book so I should be able to do it.

Bet it wouldn't take more than 10 lines. Maybe less. Some sharp python whiz might get it all on one line.
 
Old 08-18-2014, 05:34 AM   #19
tulsi
Member
 
Registered: Aug 2009
Location: Chennai
Posts: 54

Original Poster
Rep: Reputation: 15
Hi All,

Past two days off for me that's why I didn't reply yours inputs.

Thanks for all the inputs & suggestions.
 
  


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
[SOLVED] Attach word from file to the end of other file recursively bash vnistelroot Programming 3 01-12-2012 10:51 AM
bash shell script read file word by word part 2 justina Programming 7 01-25-2011 02:19 PM
[SOLVED] bash shell script read file word by word. justina Programming 15 01-22-2011 11:12 AM
how to delete last number/word of a file and incude file count at the end of the chennaiguy Linux - Newbie 2 02-18-2008 10:08 PM
[SOLVED] find a word in a file, and change a word beneath it ?? vikas027 Programming 10 02-14-2008 10:46 PM


All times are GMT -5. The time now is 01:03 AM.

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