Jump To Content

Username:
Password:

Register
250 days left!

vmware serial console

Posted by nuxi on 2008-Mar-27 at 20:57:06 in Computers (Login to reply)

Running vmware headless is very convient for running servers to debug various things. The real trick is getting the serial port working because vmware doesn't make a TTY device, it makes a named pipe. Luckily someone on IRC helped me out with that part by recommending an application called Socat. Now I can do kernel hacking in vmware without needing the GUI open in case networking doesn't come up!

socat UNIX-CONNECT:/tmp/vmware-console PTY,link=/tmp/vmware-serial,raw,echo=0

/tmp/vmware-console is the named pipe created by vmware. The correct settings for the serial device are:
* Use named pipe
* This end is the server
* The other end is an application

/tmp/vmware-serial is the TTY device to give to minicom or your serial console app of choice. The speed settings don't seem to matter.

You can put those files anywhere, but minicom has been modified by some distros to not like TTYs that aren't in /dev

vmrun can be used to control the state of the VM.

This is also good if you are running production boxes in vmware.

View all 0 comments

HUSKY!!!!!!!!!!!!!!!!!!!!!!!!!!

Posted by nuxi on 2008-Mar-15 at 16:37:40 in HSHV (Login to reply)





View all 0 comments

If the thought of something makes me giggle for more than 15 seconds, its probably a bad idea...

Posted by nuxi on 2008-Mar-04 at 21:46:59 in Computers (Login to reply)

nuxi@junkers:~(0)$ ps
PID TTY TIME CMD
4866 pts/10 00:00:00 bash
4871 pts/10 00:00:00 \_ ps
nuxi@junkers:~(0)$ gdb /usr/bin/gdb 4872
GNU gdb 6.7.1-debian
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib/i686/cmov/libthread_db.so.1".
I refuse to debug myself!
/home/nuxi/4872: No such file or directory.
(gdb)


Apparently I have to be more clever:

nuxi@junkers:~(0)$ gdb /usr/bin/gdb
GNU gdb 6.7.1-debian
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib/i686/cmov/libthread_db.so.1".
(gdb)
(1)+ Stopped gdb /usr/bin/gdb
nuxi@junkers:~(148)$ ps
PID TTY TIME CMD
4866 pts/10 00:00:00 bash
4885 pts/10 00:00:00 \_ gdb
4887 pts/10 00:00:00 \_ ps
nuxi@junkers:~(0)$ fg
gdb /usr/bin/gdb
set args /usr/bin/gdb 4885
(gdb) run
Starting program: /usr/bin/gdb /usr/bin/gdb 4885
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(Thread debugging using libthread_db enabled)
(New Thread 0xb7ccb6b0 (LWP 4888))
(no debugging symbols found)
(no debugging symbols found)
GNU gdb 6.7.1-debian
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib/i686/cmov/libthread_db.so.1".
Attaching to program: /usr/bin/gdb, process 4885


WIN!

View all 0 comments

Poor puppy

Posted by nuxi on 2008-Mar-03 at 12:23:42 in HSHV (Login to reply)

I walked the pit bull with the scars again yesterday.



And the first pic I tried to take. Yep she is great at looking at my camera, with her butt.

View all 0 comments

Poor dog

Posted by nuxi on 2008-Mar-01 at 22:21:17 in HSHV (Login to reply)

I knew when I started walking dogs at HSHV I'd eventually hit some things:
* A dog I really liked would be adopted
* I'd encounter one of the dog fight rescue ones

Both happened today. That cute little husky puppy was adopted by someone. I walked it today though, she is a great puppy. She is a lot less scared then when she first showed up at the shelter.

Then I walked a pit bull that had been in a fight of some sort :( poor doggy had a bunch of scars. There is a dog fighting problem so it was probably a dog fight rescue.

No pictures today since I left my phone in my car.

View all 0 comments

Even more puppies

Posted by nuxi on 2008-Feb-24 at 12:31:17 in HSHV (Login to reply)

First off is a stray named Dime. Dime barks and whines just like my last dog did. He is really good on a leash, he doesn't pull but he walks as far ahead as he can.



Spent a half hour playing with Maverick, he loves to run. He hasn't picked up on the whole idea of giving me the toys so I can throw them again though. I wanted to play with Dakota but he got a blue lock, apparently he is sick :(

Then there is Isis... the unnmaed husky from yesterday. She was so friendly today. Still a little bit shy, but she was licking my face for a long time.



I added a category for my time at the Humane Society of Huron Valley (which is why the category is hshv)

View all 0 comments

Another puppy

Posted by nuxi on 2008-Feb-23 at 21:26:25 in HSHV (Login to reply)

I walked a bunch more dogs before they closed. Dakota is a bit camera shy.




I walked more dogs, but I only took pics of Dakota.

View all 0 comments

PUPPIES!

Posted by nuxi on 2008-Feb-23 at 18:25:34 in HSHV (Login to reply)

I might have to make a category for these. I spent 2 hours at the shelter playing with puppies this morning.

First I walked a 3 month old unnamed husky. She got spooked and I had to carry her back inside. Poor little girl. (EDIT: she had a name when I went back at 1530, its Isis)



Then I of course had to take out the nice cuddly 5 month old pit bull in the next cage over. Diamond would rather have me sit with her and let her lick my face than actually walk somewhere.



Then I walked some more random dogs that hadn't been out yet this morning. Before I spotted an adult husky named Maverick. Maverick likes to take people for walks, rather then have someone take him for a walk.



So I took him to the outdoor playpen to run around in. Of course, after I unhooked him I realized I'd eventually have to catch him.



Thats Maverick toying with me by pretending to be a good dog, he'd run away as soon as I'd reach out for him.



I'm gonna go back later today and play with the puppies again.

View all 0 comments

Confessions of a troll

Posted by nuxi on 2008-Jan-30 at 03:24:04 in Computers (Login to reply)

Occasionally I'll see of a cry of "you're spamming my inbox" on a mailing list I'm on. This is usually after a heated argument on a topic that occured on a normally low traffic mailing list. Well I hate to say it but if that is true then you're doing it wrong!

(Note: I'm not picking on anyone. I've been tempted to do this for awhile and someone who knows the insane volume of my email asked me to explain how I do it)

I get about 100 legitimate emails per day in my personal mailbox and 100 more in my work email box. I don't keep records of how much spam I get but based on overall internet statistics it is probably 200-300 messages a day. Spamfiltering is really beyond the scope of this post but I use Bogofilter. Just so you get an idea of how much that is, I fill my MTU mail quota every 6 months. I don't delete anything either, I have one folder with 15,000 messages in it.

Sadly, I can't provide examples for mail clients I don't use so you'll have to make do with the suggestions and specific examples of mine and see if yours will do it too. You can post a reply asking in the hopes that someone else can help you, but I suggest you head to the appropriate forum for your mail client to ask.

1. Folders

If you let all the email go to your inbox, it will drive you crazy. Thats why someone invented mail filtering so that you could sort your email into different folders automatically. Personally I don't let my actual mail client do this because that means if I'm somewhere else and use a different mail client to access the email box my mail isn't sorted.

Instead I use a tool called Procmail. Procmail runs whenever you recieve email and filters it before your mail client gets to touch it. Procmail has a config file where you specify the conditions and then where to put the email. Here is the line of mine that filters the email from partners-l:

:0
* ^Sender: owner-partners-l@mtu\.edu
.partners/


Thats a very simple rule as far as procmail goes, so I'll explain it. First I have no idea what :0 means but it marks the start of a rule. The next line gives the condition it matches. The final line is the mailbox to save it to. Both the leading . and trailing / are part of the folder, they indiciate the format of the mailbox which is maildir for this example. Procmail can be much more complex, but this is a very basic use of it so it is rather simple.

One item of note here is that I am filtering on the Sender header instead of To or CC. This is because some messages were being sent to partners-l@mtu.edu and lug-l@mtu.edu. I'm on both lists and would recieve two copies of the email. If I filtered based on the To or CC lines then both copies would end up in the same mailbox. By filtering on a line that is set as it is handled by the mailing list software I can get one copy in each mailbox! Pretty cool huh?

Other common headers you can find are X-Loop, X-BeenThere, and MailingList. Exactly which one is used depends on the mailing list software involved.

Most mail clients support filtering, although some only support doing it on certain headers. At work I'm currently using Mail.app (OSX mail client) to perform the filtering and it is working out rather nicely.

2. Threading

This is one a lot of people aren't even aware of cause few mail clients support it and fewer enable it as a default. But nothing is better for a mailing list! What a threaded mail client does is organize email by topic. There are different ways to do this (none of which are perfect) but overall it handles it rather nicely. My spies tell me that Thunderbird and Mail.app also support this feature. Outlook of course is taking the short bus and barely supports RFC822. Personally I use this nice little application called Mutt because "All mail clients suck, this one just sucks less." as the author describes it.



Assuming you filtered your mail, that is probably how you saw all the email come through. Imagine if there was an important email hiding inbetween all that junk!



That is roughly how a threaded mail client would display today's fun. Notice how with threads a new topic or branch of a discussion is easily noticeable? When you're on lists that have a half dozen discussions going on at any given time this can be very useful.

3. Threading part II: Collapsing

The cool thing about threading is that since your mail client has already grouped a discussion, it can easily ignore the discussion too! Here is a picture of ust the main KVM argument collapsed:



See, now I won't see any new email to the thread cause it is hidden beneath the top post. Many threaded clients also support collapsing all threads:



4. Ignoring a thread

Just for a quick example, this is the folder I store all my LUG and 2600 email in. This folder contains 3 mailing lists.



Obviously I didn't read a lot of that (the 'O' means unread) but it is still easily manageable.

5. Do not feed the trolls!

I cannot stress this one enough. Some people have turned trolling into an art. My favorite troll ever was a message titled "Not to start a flamewar but reiser sucks ass" in a discussion about filesystems. I was actually laughing too hard to feed it, much to the disappointment of the author. Although if I remember right, he somehow succeeded anyway.

I didn't deliberately troll the list this time. All I did was tag the end of my message with the joke, "(plus why would you want to use windows?)". This was a silly observation I made to make the problem at hand irrelevant. Now lets make this very clear:

NEVER RESPOND TO A TROLL

If you feed a troll you have no one but yourself to blame for the result. Trolls, like creationists, are not bound by silly things like logic or facts. You are not likely to do anything but encourage them. Trolls are very good at what they do and they are usually in cahoots behind the scenes. Do not attempt to get the last word unless you are admitting defeat, a good troll won't let you have it. Remember, a troll is faking stupidity and as the saying goes:

"Never argue with an idiot, they drag you down to their level and then beat you with experience." -Anonymous



6. Don't complain about spam (if its trolling or a flamewar)!

Unless you are the list administrator there is nothing you can do and it really only tells them that they are succeeding. Usually it only heads to the topic of spam and those noisy vikings. Which is a topic full of it's own flamewars that you don't want to encourage.



I hope you can use these hints to better manage your email load. For a final note, here is a 200 message discussion on a mailing lists (hidden off screen is 100 more messages in a different thread). Now that is a mailing list :)

View all 0 comments

ISO 9000 rant

Posted by nuxi on 2008-Jan-21 at 00:58:36 in Computers (Login to reply)

Since working on FADECs for 8 months and participating in the subsequent FAA audit makes me an expert, I've been asked what I think about the crash. Sadly I can't provide any better insight than what you can find in the news. The short version is the both engines failed to respond to both an automated and manual request for more thrust which resulted in insufficient thrust to allow the plane to reach the runway. The passengers were lucky they had a pilot who was good at flying a brick. If you want to know more you'll just have to wait for the official accident investigation report.

Although I can't provide any specific insight into this crash, I would like to take a moment to talk about software engineering and the obession with ISO 9000. This really doesn't have anything to do with the crash, I just like excuses to rant on topics.

ISO 9000 is not about producing good code its about producing consistant code. No amount of process can replace the knowledge required to produce good code. The belief that consistancy means quality is hardly unique to engineering. This same belief is contained in the adage "Practice makes perfect." My band teacher used to say "Practice makes permanent" instead because all practice does is teach you to do it consistantly. Consistancy is only a virtue if you aren't a screwup.

View all 0 comments