Showing posts with label messages. Show all posts
Showing posts with label messages. Show all posts

Saturday, April 25, 2009

More Funny Applications Errors From Linux, Unix And Elsewhere

Hey There,

Well, the sunny breezy weather forecast out here in Chicago has turned out to be nothing but oppressive humidity (which almost never happens ;) so I've spent most of my day seeing spots. Thankfully, around these parts, the fall, winter and spring take up a lot more of the year than the summer (or maybe it's just that the winter gets so freezing cold that it seems longer. Whatever it is; I love it and it makes this misery bearable ;)

I ran into another "bad slab magic error" today, installing an older version of RedHat Linux on a freebie junk-pc that a neighbor decided to punt to the curb and it was hard not to crack a smile (I don't know why that error always makes me laugh. It just sounds really really goofy to me, and I love goofy humor :)

Anyway, that error message got me thinking that I haven't scoured the net for funny error messages in a while, but, thankfully, folks are still posting them like they're going out of style (I think, in fact, that the opposite is true and they have yet to come into their own ;)

This batch of funny application error messages below was found on the Waikato Linux Users Group Site, and they deserve all the credit for either collecting these gems or (I'm not here to judge) making them up. If it sounds reasonably credible (which most incomprehensible error messages do, nowadays), I'll put aside whatever I'm doing to chuckle for a moment or to. Even if I'm only chuckling on the inside ;)

They (Reader's Digest ;) say that laughter is the best medicine. If that's true, this page will do you some good. If you've gone and severed a limb, you may need to go see a doctor. That's one of the ailments they almost never misdiagnose and, although they can cure it, there's rarely any laughter involved.

It's a backward, upside-down, topsy-turvy world ;)

Cheers,



Messages reported by applications and OperatingSystems


These are some of the funny, sarcastic, or just plain stupid error messages that you might see. If you are looking for "proper" error messages from applications, and how to resolve them, look at ApplicationErrorMessages.


Keyboard not found. Hit F1 to continue


Many BIOSes will report this error if a keyboard is not found at boot time.


lp on fire


The Linux lp# driver says this when your printer signals an error, but doesn't signal which error. Usually this means the printer is offline. (This message was copied from much earlier line printer daemons from Unixes of old.)


Update: Kernel 2.4.20 contains the following change from 2.4.19:



diff -urN linux-2.4.19/drivers/usb/printer.c
linux-2.4.20/drivers/usb/printer.c
--- linux-2.4.19/drivers/usb/printer.c Fri Aug 2 17:39:45 2002
+++ linux-2.4.20/drivers/usb/printer.c Thu Nov 28 15:53:14 2002
@@ -257,7 +257,7 @@
* Get and print printer errors.
*/

-static char *usblp_messages[] = { "ok", "out of paper", "off-line", "on fire" };
+static char *usblp_messages[] = { "ok", "out of paper", "off-line", "unknown error" };

Q276304 - Error Message: Your Password Must Be at Least 18770 Characters and Cannot Repeat Any of Your Previous 30689 Passwords


A Microsoft Windows error message as reported by comp.risks 21.37


You don't exist. Go away.


This message appears for certain unix programs when an entry can't be found for you in /etc/passwd (or these days, via PAM). This might be because you've not logged in via login(1) (this can happen if /etc/inittab specifies a program that doesn't log you in, instead of getty(8)), if your machine can't retrieve the data from the network (if you are using NIS or LDAP or some other network user administration system) or if you've made a mistake editing /etc/passwd (or friends).


Curse on you, wizard, before you recurse on me.


bibtex(1) style files use an undocumented language called BST (or that's the file extenstion, which is the closest it has to a name). In this language recursion is prohibited, and this is the message you get if you try it.


I refuse to debug myself!


If you tell GDB to try to attach to its own process. (It can't run it and breakpoint it and the same time.)


The devil is in the details: zero number of heads or sectors


Seen from the mdir(1) command.


MicrosoftWindows MSI Installer


Software Installation encountered an unexpected error while reading from the MSI file \\mlc1\deploy\FireFox-1.0.1-enUS.msi.


The error was not serious enough to justify halting the operation.


The following error was encountered: The operation completed successfully.



sudo(1)


If the insults flag is set in /etc/sudoers, sudo(1) will return one of the following errors when an invalid password is entered:


  • Just what do you think you're doing Dave?

  • It can only be attributed to human error.

  • That's something I cannot allow to happen.

  • My mind is going. I can feel it.

  • Sorry about this, I know it's a bit silly.

  • Take a stress pill and think things over.

  • This mission is too important for me to allow you to jeopardize it.

  • I feel much better now.

  • Wrong! You cheating scum!

  • No soap, honkie-lips.

  • Where did you learn to type?

  • Are you on drugs?

  • My pet ferret can type better than you!

  • You type like i drive.

  • Do you think like you type?

  • Your mind just hasn't been the same since the electro-shock, has it?

  • Maybe if you used more than just two fingers...

  • BOB says: You seem to have forgotten your passwd, enter another!

  • stty: unknown mode: doofus

  • I can't hear you -- I'm using the scrambler.

  • The more you drive -- the dumber you get.

  • Listen, burrito brains, I don't have time to listen to this trash.

  • I've seen penguins that can type better than that.

  • Have you considered trying to match wits with a rutabaga?

  • You speak an infinite deal of nothing

  • You silly, twisted boy you.

  • He has fallen in the water!

  • We'll all be murdered in our beds!

  • You can't come in. Our tiger has got flu

  • I don't wish to know that.

  • What, what, what, what, what, what, what, what, what, what?

  • You can't get the wood, you know.

  • You'll starve!

  • ... and it used to be so popular...

  • Pauses for audience applause, not a sausage

  • Hold it up to the light --- not a brain in sight!

  • Have a gorilla...

  • There must be cure for it!

  • There's a lot of it about, you know.

  • You do that again and see what happens...

  • Ying Tong Iddle I Po

  • Harm can come to a young lad like that!

  • And with that remarks folks, the case of the Crown vs yourself was proven.

  • Speak English you fool --- there are no subtitles in this scene.

  • You gotta go owwwww!

  • I have been called worse.

  • It's only your word against mine.

  • I think ... err ... I think ... I think I'll go home


(Taken from ins_*.h in the source for sudo 1.6.6)





, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Monday, December 8, 2008

Managing Swatch Output With Yet Another Perl Script

Hey There,

Since I'm coming down from a week of getting kicked in the teeth (I mean, being 24x7 primary on call ;) this week's Monday Unix and/or Linux script is veering from the direction they mostly go in. My next idea was to create a CLI book reader to compliment out previous script to find free online books. That's still in the cooker, but requires a bit more than my frazzled brain, and sleep-deprived nervous system, can muster at this moment. Please pardon any lack of "oomph" in my "voice." ;)

The script itself is fairly easy to execute, and assumes you already have swatch setup to run (this script is written more for a single "loghost" - setup to gather information from all systems' syslog/messages), have a .swatchrc file already in place and configured and just aren't allowed to muck with it. We're also assuming, of course, that you have to deal with checking the output every morning and you're sick and/or tired of having to pick it apart by eye.

The script itself just takes two arguments: The hostname you want to search for and the name of the main swatch output file. So if you wanted to grab information from the "dbhost4" machine, you could run the script like this:

host # ./swatchlogger.pl dbhost4 /var/adm/swatch.out <-- or whatever your specific swatch output file is called.

The script should be pretty easy to make work for a single host (just take a big chunk of it away ;). If your host doesn't match one listed in the regular expression of the script it will be put in the default output file. It's all in there somewhere...

Hope you enjoy it and/or it helps you out some. Here's to sleeping. Although, according to the timestamp, it's tomorrow already, isn't it?

Oh, the humanity ;)

Cheers,


Creative Commons License


This work is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License

#!/usr/bin/perl

#
# Swatchlogger.pl - Sort out all that swatch output!
#
# 2008 - Mike Golvach - eggi@comcast.net
#
# Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
#

$hostname = $ARGV[0];
shift;
@boink = @ARGV;

if ( $hostname =~ /(webhost(3|6)|dbhost(4|3)|devhost|10.10.2.20)/ ) {
open(SWLOGFILE, ">>/var/adm/dailyswatch.dev.log");
print SWLOGFILE "@boink\n";
close(SWLOGFILE);
chmod(0644, "/var/adm/dailyswatch.dev.log");
} else {
foreach $humper (@boink) {
if ( $humper =~ /password/ ) {
$wanger = 1;
} elsif ( $humper =~ /access-request/ ) {
$boinker =1;
}
}
if ( $wanger ) {
open(SWLOGFILE, ">>/var/adm/dailyswatch.pwd.log");
print SWLOGFILE "@boink\n";
close(SWLOGFILE);
chmod(0644, "/var/adm/dailyswatch.pwd.log");
} elsif ( $boinker ) {
open(SWLOGFILE, ">>/var/adm/dailyswatch.rad.log");
print SWLOGFILE "@boink\n";
close(SWLOGFILE);
chmod(0644, "/var/adm/dailyswatch.rad.log");
} else {
open(SWLOGFILE, ">>/var/adm/dailyswatch.reg.log");
print SWLOGFILE "@boink\n";
close(SWLOGFILE);
chmod(0644, "/var/adm/dailyswatch.reg.log");
}
}


, Mike




Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Saturday, July 12, 2008

A Little Linux and Unix Humor - Error Messages

Hey There,

For this weekend, I went trolling around looking for something funny (because not enough funny things happen to me at work) and I found this great list of 189 Funny Error Messages. They're tagged under Unix but some of them are definitely MainFrame/IBM or Linux errors. Some of them may, hopefully, make you laugh, some of them may make you cry (again, laughing) and some of them you might not find amusing. Anyway, as the old joke goes, it's posted here for free and worth every penny ;)

153 and 164 were duplicates, so I replaced 153 with one of my personal favorites of all time :) This blog, since it's being hosted on blogger (owned by Google, who could crush me in an instant), I've removed all profanity, since my site is advertised as "family friendly," or something like that. I find it hard to picture a family gathering around the PC eagerly waiting to hear what happens when the Octal Dump finishes, but that was the best classification I could get ;)

If you'd like to see the unexpurgated version, please check out the original list of humorous Unix errors, leave him a comment to let him know your favorite and browse around there while you're at it. It's a pretty decent site. BTW, if you're reading this, own that site and want me to pull this post, I'll be happy to (actually, I'll be somewhat depressed). If not, I thank you for your generosity and hope this drives you some good traffic :)

Enjoy :)

1. “Values of B will give rise to dom.”
2. FATAL system error #nnnn CAUSE: We should never get here!
3. OHHHH…. I give up Core dumped
4. COMPILER UNABLE TO ABORT
5. AN ATTEMPT WAS MADE TO WRITE BEYOND THE MAXIMUM ASSIGNED SPACE FOR A MASS STORAGE FILE. AN ATTEMPT WAS MADE TO EXPAND A MASS STORAGE FILE BEYOND THE MAXIMUM ASSIGNED SPACE. A READ FUNCTION FOR A MASS STORAGE FILE SPECIFIED AN ADDRESS (WORD 5 OF THE I/O PACKET) THAT IS BEYOND THE MAXIMUM ASSIGNED SPACE. A READ OR WRITE FUNCTION FOR A WORD-ADDRESSABLE MASS STORAG FILE SPECIFIED A MASS STORAGE ADDRESS (WORD 5 OF THE I/O PACKET) AND A TOTAL DATA COUNT. WHEN THE MASS STORAGE ADDRESS IS ADDED TO THE TOTAL DATA COUNT, THE RESULTING ENDING MASS STORAGE ADDRESS IS GREATER THAN 2*/35-1. A READ OR WRITE FUNCTION FOR A SECTOR-FORMATTED MASS STORAGE FILE SPECIFIED A MASS STORAGE ADDRESS (WORD 5 OF THE I/O PACKET) THAT IS GREATER THAN 2*/30-1. ADI ONLY: REFERENCE ATTEMPTED BEYOND THE ASSIGNED FILE WHEN THE FILE IS CONFIGURED AS A FH-432 OR FH-1782 DRUM.
6. ERROR: A really big XXXX UP has been detected !!
7. Momentaraly writing while seeking..
Constantly writing while seeking..
Momentaraly writing while reading..
8. initstate: not enough state (%d bytes) with which to do jack; ignored.
9. “Keyboard not present, press any key”
10. “You lied to me when you told me this was a program”
11. “PROGRAMMER GOOFED . . . YOU SHOULD NEVER SEE THIS MESSAGE”
12. YOU CAN’T DO THAT!
13. Man the Lifeboats! Women and children first!
14. $ make :== $ sys$system:teco32 make
$ make love
Not war?
15. That makes 100 errors; please try again.
16. You can now delete more, or insert, or whatever.
17. Sorry, I don’t know how to help in this situation.
18. Maybe you should try asking a human?
19. Sorry, I already gave what help I could…
20. An error might have occurred before I noticed any problems.
21. If all else fails, read the instructions.
22. This can’t happen.
23. I’m broken. Please show this to someone who can fix can fix
24. I can’t go on meeting you like this.
25. One of your faux pas seems to have wounded me deeply.. in fact, I’m barely conscious. Please fix it and try again.
26. Interruption
27. You rang?
28. IMPOSSIBLE.
29. NONEXISTENT.
30. ETC.
31. BAD.
32. A funny symbol that I can’t read has just been input.  Continue, and I’ll forget that it ever happened.
33. I suspect you’ve forgotten a `}’, causing me to apply this control sequence to too much text. How can we recover? My plan is to forget the whole thing and hope for the best.
34. I dddon’t go any higher than filll.
35. Dimensions can be in units of em, ex, in, pt, pc, cm, mm, dd, cc, bp, or sp; but yours is a new one!
36. Something Rotten in Denmark, Interp Stack Not ALigned
37. <Assorted DEC ID fruitcake> ILLEGAL ERROR
38. bad magic number
39. “very funny”
40. “Unexpected ‘;’, expecting ‘;’”
41. You can’t do that in horizontal mode.
42. “COMPILER THWARTED”
43. “Keyboard error or no keyboard present. Press F1 to continue.”
44. “Argument is bletchful.”
45. “Guru Meditation”
46. “lint’s little mind is blown.”
47. “Hot Damn! You need more ram!”
48. String literal too long (I let you have 512 characters, that’s 3 more than ANSI said I should)
49. And the lord said, ‘lo, there shall only be case or default labels inside a switch statement’a typedef name was a complete surprise to me at this point in your program
50. You can’t modify a constant, float upstream, win an argument with the IRS, or satisfy this compiler
51. This struct already has a perfectly good definitiontype in (cast) must be scalar; ANSI 3.3.4; page 39, lines 10-11 (I know you don’t care, I’m just trying to annoy you)
52. Can’t cast a void type to type void (because the ANSI spec. says so, that’s why)
53. Huh ?
54. can’t go mucking with a ‘void *’
55. we already did this function
56. This label is the target of a goto from outside of the block containing this label AND this block has an automatic variable with an initializer AND your window wasn’t wide enough to read this whole error message
57. Call me paranoid but finding ‘/*’ inside this comment makes me suspicious
58. Symbol table full - fatal heap error; please go buy a RAM upgrade from your local Apple dealer
59. “It seem you are trying to check the output from a word-processor. Not only does this not make sense, but you would probably damage the file
60. if you tried so I am not going to let you do this!”
61. It looks like the active file is messed up. Contact your news administrator and leave the “bogus” groups alone, and they may come back to normal. Maybe.
62. Attention K-Mart shoppers: Blue Light special in out SYSTEM UTILITIES department. for the next 10 days we will be taking requests for the utilities that you think should be here. Thank you again for shopping K-Mart.
63. “Things are not looking good!”
64. “I didn’t think this set of error conditions could ever happen”
65. “Now deleting all files. Goodbye”
66. “file has bad magic.”
67. “Hi Linda! We wondered how long it would take, for you to mess up this bad.”
68. “The running master will not die…”
69. “Shut ‘er down, Clancy, she’s a-pumpin’ mud!”
70. An error has occured on the error logging device.
71. “Out of order”
72. “Hey are you talking to me? Try again!”
73. “Invalid command. Feel ashamed for yourself and try again.”
74. “Of all the commands available you picked the wrong one!”
75. “Shut her down, Scotty, she’s sucking mud again!”
76. ERROR 1164 HOW IN THE HELL DID YOU GET HERE
77. WARNING: FILE GENERATED THE FILE WHICH WAS SPECIFIED AS THE ‘COPY TO’ OR DESTINATION FILE WAS NOT THERE AND WAS THEREFORE GENERATED BY JOBCONTROL. IF YOU DID NOT MEAN TO COPY TO A NEW FILE ELIMINATE THE FILE.
78. NO ACCESS FOR $TOAD SERVICE A USER PROGRAM MADE A CALL TO A $TOAD SERVICE AND THE USER DOES NOT HAVE THE PROPER ACCESS TO BIT TO USE THAT SERVICE. ACCESS RESTRICTIONS ARE PLACED ON THE $TOADS SERVICES IN GENERAL, AND $CPRIOR, $PABORT, AND $SUSP FOR INDIVIDUAL RESTRICTIONS. JOBCNTRL ER 2167 : NO ACCESS TO VULCANIZE PROGRAM
79. AN ATTEMPT HAS BEEN MADE TO VULCANIZE A REAL-TIME, MONITOR, OR NRH
TYPE PROGRAM, OR A PROGRAM WITH HIGH ACCESS, ACCOUNTING FILE ACCESS,
OR SUB-SYSTEM ACCESS. THE VULCANIZE REQUEST IS IGNORED BECAUSE THE
USER DOES NOT HAVE ACCESS TO GENERATE SUCH A PROGRAM.
80. IT’S NOT NICE TO FOOL POP!
81. YOU JUST TRIED TO FAKE-OUT MOTHER NATURE, AND SHE CAUGHT YOU! SUPER-VULCAN NOW HAS YOUR NAME ON HIS ENEMY LIST, AND YOU CAN BE CERTAIN THAT FUTURE ATTEMPTS TO RESOURCE LFN 0,3,OR 6 WILL RESULT IN YOUR BEING ABORTED, SPINDLED, MANGLED, FOLDED, PUNCHED, DELETED, AND DEALLOCATED.
82. PROGRAM FILE DESTROYED. THE PROGRAM HAS BEEN ABORTED DUE TO INCONSISTENCIES IN THE INFORMATION GENERATED BY THE VULCANIZER. THE DISC COPY OF THE PROGRAM MAY HAVE BEEN
DESTROYED OR THE PROGRAM MAY NOT HAVE BEEN RE-VULCANIZED AFTER A MAJOR SYSTEM RELEASE. IN ANY CASE RE-VULCANIZE THE PROGRAM (RLIBS ALSO).
83. minor alarm
84. major alarm
85. critical alarm
86. alarm system failure alarm
87. This application has violated system integrity and must be terminated.
88. “You are a charlatan.”
89. “Go away. You don’t exist.”
90. Tsk tsk? Have I been a bad computer?
91. line 2706 compiler error: schain botch
92. Are you lonely?
93. Anyone have a better memory of this than I do?
94. ?NO ERROR
95. I give up…. dumping core now!
96. For heavens sake, doesn’t anyone just talk anymore?
97. Not tonight, I’ve got a headache.
98. I beg your pardon?
99. Your place or mine?
100. FORTRAN FATAL INTERNAL ERROR FATAL COMPILER DAMAGE REPORT FOLLOWS
101. ?Invalid Character At Terminal — Please Go Away
102. ?Unibus timeout — send in a new quarterback
103. ?Ouch, That HURTS!
104. You must be joking.
105. Error: Error ocurred when attempting to print error message.
106. Error #1: Power supply not found”
107. ERROR 0: POWER NOT ON
108. Break Rob’s knuckles
109. “You can tune a filesystem, but you can’t tuna fish”
110. $ man fish
Don’t say “fish”, Bishop. It doesn’t mean anything.
111. $ man overboard
BUGS: No life raft
112. “Oops! Error while handling error!”
113. Can’t find wicked faraway objects.
114. Can’t fit 27? tape through 25? door.
115. “Invalid Error”.
116. “code has no effect”
117. “No message, no subject; hope that’s ok.”
118. I the most critical examiner of all have determined that there is an error on line 42.
119. Parity Error But Segment Doesn’t Found
120. MORE CORE AVAILABLE, BUT NOT FOR YOU
121. Shannon and Bill say this can’t happen”);
122. PUNT
123. ‘Weird magic happens here’.
124. “Thou hast new mail.”
125. Too much “sourcing” going on.
126. Okie dokie
127. Mail’s idea of conditions is screwed up
128. ~h: no can do!?
129. Too many regrets
130. detract asked to insert commas
131. metoo
132. Somethings amiss — no @ or % in arpafix
133. Made up bad net name
134. ubluit
135. Who are you!?
136. ; why =
137. “The impossible has happened!”
138. Beam me up Scotty, there’s no life out here.
139. “NO ERRORS DETECTED”.
140. NO COMPILER DETECTED ERRORS.
141. Holy Panes Batman, the window’s missing!
142. “Holy PH, Batman, the buffer’s missing!”
143. “Holy Vectors Batman, I can’t get more lines!”
144. “System Error - Sureness out of Bounds”
145. Mysterious Error -nnn
146. Internal Error: Illegal hedge TV number. (huh?? what?!)
147. Internal Error: BlinkThere or HiliteThere messed up.
148. Bad External File System: Boy, is your system messed up.
149. Hodie natus est radici frate
“Today unto the root is born a brother’”
150. Looks like mere mortals are trying to enter the Twilight Zone
151. FATAL: Major security hack. Notify Administrator.
152. Identity problems, eh ?
153. Error: Bad SLAB magic!
154. ’tis is no game for mere mortals
155. Go away and get a life
156. Death before dishonour ?
157. Dave, don’t do that…
158. Good afternoon, gentelman, I’m a HAL 9000 Computer
159. Only few mortals may try to enter the Twiligth Zone
160. Only real wizzards know the spells to open the gate of paradize
161. Trying to unlock the door twice eh ?
162. Use the force, Luke !
163. Change balls, please
164. Bad Craziness - Error reported to webmaster - please hang up and try again.
165. “NONE of your errors have been found”
166. “Well, you ran into something and the game is over.”
167. “Unused error message #xxx”
168. “FALL DOWN GO BOOM”
169. Data potato doo-wop doo-wop
170. Okie dokie, core dumped.bash
171. Puke.
172. spurious multibus interrupt
173. EDOTDOT!!!!
174. Your guess is probably much better than mine.
175. You wascal wabbit! Wandering wizards won’t win!
176. savemail: HELP!!!!
177. Who are you ?
178. MAIL DELETED BECAUSE OF LACK OF DISK SPACE
179. Can’t suspend a login shell (yet).
180. EH?
181. You are a charlatan, bordeaux.kpno.noao.edu
182. “Your expression has defeated me”
183. “Your formula has defeated me”
184. WARNING: 54 - PROGRAM NOT RECURSIVE
185. Help is not available for you.
186. Masscomp C compiler:”Insane structure member list”
187. User Error: An unknown error has occurred in an unidentified program while executing an unimplemented function at an undefined address. Correct error and resubmit.
188. Liar, Liar! Pants on Fire!
189. Error: Success

, Mike

Tuesday, December 18, 2007

Script To Convert Solaris Truss Error Output Into Plain English

A fairly common request I get when helping to debug problems with executables, or other types of programs that need to be "trussed" (or have their system calls traced; which is a huge generalization ;), is to "please explain what all the error output means." Sometimes, possession of this knowledge can be the answer to the problem handed to me on a plate.

Solaris' truss (available on Linux as strace or xtrace - although with slightly different options and output) is an excellent tool for debugging and can be used as simplistically or with as much complexity as you're comfortable with. End users of Unix systems (the client or office staff) generally don't want to deal with it at all.

Although it isn't always true, a lot of times the error message that precedes a program's crash is a significant help in determining the root cause of the problem. Just knowing that, for instance, the program tries to write to an output file, and gets an error indicating that there's not enough space left on the device (or partition), immediately before it crashes can solve the case right then and there.

To that end, I threw together today's script. I think we'll definitely delve deeper into using truss (and also xtrace/strace) in a completely separate post. This script serves a very limited purpose, but can be a helpful tool to use as a first step, if you've got a lot going on (or if you believe - like I do - that most problems aren't as complicated as we can make them ;). It takes the arguments of whatever program you would run truss against (along with that program's arguments). So, if you would normally run (and we're keeping the truss simple here, with no options, which isn't the case in the script):

/usr/bin/truss /usr/bin/myprogram -f myconfig

Here, you'd simply run ( I'll name this script error_detail.sh for now):

./error_detail.sh /usr/bin/myprogram -f myconfig

The script essentially strips down the output of truss to the lines that contain system errors (like ENOENT and EIO, etc) and then takes those lines and prints them out, followed by the literal description of the error ( extracted from the contents of Solaris' /usr/include/sys/errno.h).

e.g. EPERM translates into "Operation Not Permitted"

Hopefully, this will help you get to those simple conclusions a little faster (and also remind you of what some of the more obscure system errors actually mean ;)

Cheers,


Creative Commons License


This work is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License

#!/bin/ksh
#
# error_detail.sh
# 2007 - Mike Golvach - eggi@comcast.net
#
# Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
#

trap 'exit 1' 1 2 3 9 15
program="$@"

/usr/bin/truss -f $program 2>&1|awk '{ if (( $NF > 0 && $(NF-1) ~ /Err#/ ) || ( $0 ~ /truss: cannot trace/ )) print $0 }'|while read x
do
cant_truss=`echo $x 2>&1|grep -i "truss: cannot trace" >/dev/null 2>&1`
if [ $? -eq 0 ]
then
print "Truss cannot trace this command and/or it's argument(s)!"
print $x
exit 2
fi
err_detail=$(grep `echo $x|awk '{ print $NF }'` /usr/include/sys/errno.h|sed 's/\/\*\(.*\)\*\//\1/'|sed 's/^.*[0123456789] * *\(.*\)$/\1/')
print "$x : $err_detail"
done
exit 0


, Mike