Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 08-16-2014, 10:12 AM   #16
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 5,390

Rep: Reputation: 409Reputation: 409Reputation: 409Reputation: 409Reputation: 409

Good point! With dirty onliner, output would be like
==> 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 10:14 AM.
Old 08-16-2014, 08:37 PM   #17
Registered: Jul 2004
Location: Chennai, India
Distribution: UBUNTU 5.10 since Jul-18,2006 on Intel 820 DC
Posts: 846

Rep: Reputation: 201Reputation: 201Reputation: 201
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?

Old 08-17-2014, 08:52 PM   #18
Registered: Mar 2008
Posts: 17,000

Rep: Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513
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, 04:34 AM   #19
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.


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 09:51 AM
bash shell script read file word by word part 2 justina Programming 7 01-25-2011 01:19 PM
[SOLVED] bash shell script read file word by word. justina Programming 15 01-22-2011 10: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 09:08 PM
[SOLVED] find a word in a file, and change a word beneath it ?? vikas027 Programming 10 02-14-2008 09:46 PM > Forums > Linux Forums > Linux - Newbie

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

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