All posts by danw

Solaris Live Upgrade: NOOOOOOOOO!

I’ve been having a lot of fun with Solaris Live Upgrade at work lately. I’ve discovered a few interesting things that I thought I should share.

Live Upgrade can down your server if you’re not carefull

I don’t know why, but I’ve managed to down my server twice in the last week trying to create live upgrade boot environments. One zone lost the ability to see any mounted directories there by scaring the crap outta the DBA and requiring a zone reboot to fix, another abbandonned a cpio process copying data to the root file system. While it didn’t cause a crash, it could have broken some processes and SMF requires free space in /etc to operate correctly (aka save crashed processes)

Live Upgrade lucreate doesn’t fail cleanly

If live upgrades lucreate fails for any reason, it is very hard to recover. You can’t unconfigure the new boot environment, you cant delete the new boot environment, you can only complete the new boot environment, and that doesn’t work if say there isn’t enough physical space, or another hardware problem emerges

Live Upgrade ludelete doesn’t work most of the time

If you accidentaly destroy the metadevices or zfs file systems that live upgrade expects to exist in a boot environment, you cannot delete it. If the boot environment is “in complete” you can’t delete it, you preaty much can’t do anything with ludelete except remove pristine live upgrade environments. AKA only about 10% of the boot environments you wanted to delete.

Live Upgrade is iffy at best

So far this week I’ve had live upgrade refuse to patch zones because a single temp file didn’t copy correctly during boot creation. I’ve had lucreate mangle zone names then complain that the mangled name doesn’t exist. If you have a zone that mounts a file system, you have to include it in an exclude list file, or live upgrade will try to copy the contents of that additional file system onto your zones root drive.

How I Live upgrade

  1. tar up /etc/lu*
  2. ls -al /tmp for each zone including global-zone
  3. create an exclude file listing all that you dont want on the zone’s root filesystem
  4. create a new live upgrade boot environment
  5. luupgrade either to a new version of solaris or to install patches
  6. luactive your new boot environment
  7. reboot as instructed via init 6
  8. confirm that the correct disk/filesystem is booting
  9. delete /etc/lu*
  10. restore /etc/lu* from the tar file
  11. If at any time something doesn’t work right, blow away all of the live upgrade configuration and restore with the tar file. Also remove any additional files from zones under /tmp that may be associated with live upgrade

This is probably quite bad advice but I find live upgrade only seems to work when it is the first time you are using it. All subsequent times you get stuck with missing file systems that you removed since the last time you upgraded, weird file access errors, zone misnames, file systems filled to 100% with data you didn’t want copied, left of processes changing things you probably didn’t want it to.

Sex chat with a spam bot

I don’t often feed the troll but I wanted to see how long the script was for this Bot. Although I didn’t actually find out as I was duity bound end the conversation in the appropriate manner.

(21:14:48) hey babes 😉
(21:15:11) dan: purple
(21:15:22) think we chatted before right?
(21:15:31) dan: bumpersticker
(21:15:42) mhmm stick it in and cum in me !!
(21:15:52) dan: coffee cup
(21:16:04) i’m sorry i get to be forgetful at times!! how’re you?
(21:16:21) dan: highway beep
(21:16:32) i’m 24/f ……u?
(21:16:37) dan: alphabet
(21:16:48) nice, I just got out of the shower and finally got some time to relax ..what are you up to?
(21:17:19) dan: internet beach soup
(21:17:30) Nice..I’m feeling a little naughty
(21:18:07) dan: tv gravel work
(21:18:18) Yeah I’m horny lol ..sorry if that’s forward that cool?
(21:18:56) dan: disney keyboard meow
(21:19:08) I need a man who can make me squirt..have u ever made a girl squirt??
(21:19:49) dan: paperwork sound plastic pop
(21:20:00) lolz yeah i need it babe…i’m so worked up..wanna see what i look like?? i’ve got a sweet ass that loves attention!!
(21:21:15) dan: tuesday fort angle tree
(21:21:26) do you cam?
(21:21:40) dan: calculator
(21:21:51) Well i don’t do msn cam or any other cam because i have been recorded before… But i do know one site you can watch me on cam, that assures me no one records…
(21:22:19) dan: driveway cola
(21:22:30) I mean… Do you want to see me on my cam?
(21:23:03) dan: google blink
(21:23:13) Its just accept my cam invite,
(21:23:18) dan: blank space
(21:23:30) Ok go to accept the invite on the page baby
(21:24:03) dan: zigzag spaceship
(21:24:14) sweet, fill out ur info..takes 2 secs..don’t worry it’s free!!..cause I’m sending you a buddy invite.. i can’t wait for you to see me baby let me find something nice to wear or maybe nothing at all 😉 ..k?
(21:24:33) dan: upsidedown internet
(21:24:44) if your internet is slow the site will load a bit slow, but don’t worry, you’ll see me sexy!
(21:25:23) dan: dennys wafles
(21:25:34) its the sites policy to ensure no minors get access to the site, so they might ask for CC to verify your age babe…but again no worries it’s free!!! k?
(21:26:23) dan: engine baccon
(21:26:33) cc is just to verify’ll get in for free through my page!
(21:26:57) dan: sideways star trek
(21:27:09) What color Panties do you think i should wear? i might have you favorite color here somewhere…;)
(21:27:26) dan: spellcheck roadkill
(21:27:37) Your such a good boy, i’m gonna show you what good boys deserve.. you can tell me to do anything you want me too!
(21:28:09) dan: floor talk grey
(21:28:19) ofcourse not babe, just requires cc for age verification, pretty much like every other raunchy
(21:28:52) dan: insect tire game sneeze
(21:29:03) Ok let me know when you get in so I can invite you directly to my cam.
(21:29:31) dan: injured bike silently
(21:29:42) u have to enter a cc, atm, or debit card so they can tell your of age, thats the ony way to see me sweety 🙁
(21:30:20) dan: chewbacca
(21:30:32) k you in yet babe??
(21:30:46) dan: thats what your mom said
(21:30:50) dan: BURN!

dhcpdump and patch

I was at work the other day and the whole network went down. DHCP and upstream routers went out and the network went kinda nuts. I tried dhcpdump to get a look at the traffic on the local network segment.

Sadly it doesn’t work with pcap files (from tcpdump or wireshark), it only works with live network interfaces and must be run as rroot. So I decided to add pcap file to dhcpdump 1.8. I tried contacting the author but didn’t hear back, so I decided to put it up here.


  • add option to read from pcap file
  • change to read time from pcap packet header
--- dhcpdump-1.8/dhcpdump.c     2008-06-23 20:26:52.000000000 -0700
+++ dhcpdump.c  2009-09-30 15:22:10.000000000 -0700
@@ -71,7 +71,7 @@
 void   printHexString(u_char *data, int len);

 void usage() {
-       printf("Usage: $0 <-i interface> [-h macaddress]n");
+       printf("Usage: $0 <-i interface|-f pcapfile> [-h macaddress]n");

@@ -80,6 +80,7 @@
        pcap_t *cap;
        struct bpf_program fp;
        char    *interface = NULL;
+       char    *pcap_file = NULL;

        for (i = 1; i < argc; i++) {
                if (argv[i] == NULL || argv[i][0] != '-') break;
@@ -90,6 +91,9 @@
                case 'i':
                        interface = argv[++i];
+               case 'f':
+                       pcap_file = argv[++i];
+                       break;
                        fprintf(stderr, "%s: %c: uknown optionn",
                            argv[0], argv[i][1]);
@@ -97,13 +101,24 @@

-       if (interface == NULL) usage();
+       if (    //no interface or pcap file specified
+               ((interface == NULL) && (pcap_file == NULL)) ||
+               //both an interface and a pcap file specified
+               ((interface != NULL) && (pcap_file != NULL))
+               )
+               usage();

        if (hmask)
                regcomp(&preg, hmask, REG_EXTENDED | REG_ICASE | REG_NOSUB);

-       if ((cap = pcap_open_live(interface, 1500, 1, 100, errbuf)) == NULL)
-               errx(1, "pcap_open_live(): %s", errbuf);
+       if (interface != NULL) {
+               if ((cap = pcap_open_live(interface, 1500, 1, 100, errbuf)) == NULL)
+                       errx(1, "pcap_open_live(): %s", errbuf);
+       }
+       else {
+               if ((cap = pcap_open_offline(pcap_file,errbuf)) == NULL)
+                       errx(1, "pcap_open_offline(): %s", errbuf);
+       }
        if (pcap_compile(cap, &fp, "udp and (port bootpc or port bootps)", 0, 0) < 0)
                errx(1,"pcap_compile: %s", pcap_geterr(cap));
        if (pcap_setfilter(cap, &fp) < 0)
@@ -148,12 +163,11 @@
        offset += sizeof(struct udphdr);

-               struct timeval tp;
-               gettimeofday(&tp, NULL);
+               //get time from pcap to enable reading from capture file
                strftime(timestamp, sizeof(timestamp), "%Y-%m-%d %H:%M:%S.",
-                   localtime(&(tp.tv_sec)));
+                   localtime(&(h->ts.tv_sec)));
                sprintf(timestamp + strlen(timestamp), "%03ld",
-                   tp.tv_usec / 1000);
+                   h->ts.tv_usec / 1000);

        strcpy(mac_origin, ether_ntoa((struct ether_addr *)eh->ether_shost));


Okay, so I’m stuck at work trying to patch some computers on sunday morning so I can get live upgrade working (see here) to shorten the outage for an impending upgrade/patch cycle. Boo. Then I manage to break said computer attempting a roll back. Double boo.

Now i’m doing the ghettoest of the ghetto restore techniques. Netbackup? No, Netapp’s magical snap client? No.
Tar baby!

(cd /mnt/netapp/mount/point/root && tar cEf - *) | (cd / && tar xpf -)

Hint: Gotta have the star ’cause a dot would include netapp specific hidden directories

or even better

ssh otherserver -l root "cd /mnt/netapp/mount/point/root && tar cEf - *" | (cd / && tar xpf -)

’cause I can’t use rsh (which would be much much faster [no encryption]). Yeah, the speed of ssh.

The moral of the story? Don’t try so hard. Don’t patch a machine with the specific minimal patches you need to you can use live upgrade to make patching and upgrading faster. Do a full 10_Recommended(2.6GB of patches [as of Jun 2009]), then any remaining patches, then get live upgrade working. So what if it takes an extra 24 hours of outage time. At least you know it’s going to work.

Sexism and stuff

There is a checklist of the “Privileges” here men have from being men. I’ve decided to rebut some of these points.

The Male Privilege Checklist

1. My odds of being hired for a job, when competing against female applicants, are probably skewed in my favor. The more prestigious the job, the larger the odds are skewed.

This one is very wishywashy, the argument is presumed to be true so I’m supposed to agree. There are jobs/employers/environments where this will be true AND there are jobs/employers/environments where it will be false.

2. I can be confident that my co-workers won’t think I got my job because of my sex – even though that might be true. (More).

This one is annoying because it’s a double standard. On the one hand it implies that women should be hired even if they’re less optimal employees simply to stay “PC”, and then whines about it. Pick one.

3. If I am never promoted, it’s not because of my sex.

4. If I fail in my job or career, I can feel sure this won’t be seen as a black mark against my entire sex’s capabilities.

Insecure much? And when I as a male get the flu does that reflect ill on men the world over? Duh?

5. I am far less likely to face sexual harassment at work than my female co-workers are. (More).


6. If I do the same task as a woman, and if the measurement is at all subjective, chances are people will think I did a better job.

This is another ontalogical argument. It’s presumed true because it’s presumed true.

7. If I’m a teen or adult, and if I can stay out of prison, my odds of being raped are relatively low. (More).

Valid, although applied more to straight males than gay males

8. On average, I am taught to fear walking alone after dark in average public spaces much less than my female counterparts are.

This is beating the dead horse on the rape subject

9. If I choose not to have children, my masculinity will not be called into question.

This one is women judging women. If this is sexism against women, then all the times men judge other men should count as sexism against men. Eg. how good a job is, how “hot” the significant other is, car, “faggyness”, etc

10. If I have children but do not provide primary care for them, my masculinity will not be called into question.

This one is BS. There are soo many dual income familys where the kids only see thier parents on weekends it has become (I think) the norm

11. If I have children and provide primary care for them, I’ll be praised for extraordinary parenting if I’m even marginally competent. (More).

This one is BS too. ANYONE who takes a hit on thier carreer to look after thier kids will be praised. Only women with crapy jobs (secretary, waitress) won’t be, just as men won’t if they leave crapy jobs (fast food, manual labour)

12. If I have children and a career, no one will think I’m selfish for not staying at home.

Again this is BS, it’s the norm

13. If I seek political office, my relationship with my children, or who I hire to take care of them, will probably not be scrutinized by the press.

BS, eveything is scrutinized. I don’t think it should be but everyone goes under the microscope when they go up for ellection

14. My elected representatives are mostly people of my own sex. The more prestigious and powerful the elected position, the more this is true.

This is about gender trends for certain types of jobs. The same can be said for crapy drangerous jobs, the more dangerous the more likely it is to be male.

15. When I ask to see “the person in charge,” odds are I will face a person of my own sex. The higher-up in the organization the person is, the surer I can be.

This is the carrier complaint “Women don’t avance as far as fast”.

16. As a child, chances are I was encouraged to be more active and outgoing than my sisters. (More).

Flat out lies. Girls are encouraged to communicate, and interact (aka be outgoing) boys are told to go play tag or shoot immaginary guns

17. As a child, I could choose from an almost infinite variety of children’s media featuring positive, active, non-stereotyped heroes of my own sex. I never had to look for it; male protagonists were (and are) the default.

Dunno, haven’t been paying attention to female roles in childrens entertainment, although Dora the explorrer makes me wonder

18. As a child, chances are I got more teacher attention than girls who raised their hands just as often. (More).

And as children boys are generaly believed to be doing much worse in school. The whole girls are taller, smarter, more mature thing? thats from 8-13

19. If my day, week or year is going badly, I need not ask of each negative episode or situation whether or not it has sexist overtones.

This is insecurity again

20. I can turn on the television or glance at the front page of the newspaper and see people of my own sex widely represented, every day, without exception.

Hrm. Then howcome most TV anchors are women? Unless you mean the topic of news coverage, then yes if it is about a crime it is most likely about a man

21. If I’m careless with my financial affairs it won’t be attributed to my sex.

Uh hello? As far as I’ve been hearing women handle money much better than men. All the men I work with who are married say thier wives manage the family piggy bank

22. If I’m careless with my driving it won’t be attributed to my sex.

Where as if men are at all agresive while driving it is attributed to thier sex. It’s called a difference. Men and women are not the same. One obvious example if driving habits

23. I can speak in public to a large group without putting my sex on trial.

I don’t even understand this one. It’s more of the insecurity like #s 3,4,9,10

24. Even if I sleep with a lot of women, there is no chance that I will be seriously labeled a “slut,” nor is there any male counterpart to “slut-bashing.” (More).

This is mostly judment rendered by other females. And men to get called names if they sleep around alot

25. I do not have to worry about the message my wardrobe sends about my sexual availability or my gender conformity.

This is about the visual nature of attraction for men and the competitiveness of women seeking a male partner. Most of the juding of this “message” is by other women. Not my fault women are mean to other women, please stop blaming me

26. My clothing is typically less expensive and better-constructed than women’s clothing for the same social status. While I have fewer options, my clothes will probably fit better than a woman’s without tailoring. (More).

This is more of the same from 25. Men are innitially attracted visually. Than means people interested in attracting men need to be visually appealing. And I’m betting “better-contructed” means thicker. Hetro men don’t need to worry as much about appearences so they don’t need thin/semi-transparent clothes

27. The grooming regimen expected of me is relatively cheap and consumes little time. (More).

Again see #25,26

28. If I buy a new car, chances are I’ll be offered a better price than a woman buying the same car. (More).

And if a man buys furniture or a kitches package he won’t get as good a package. Because it’s assumed that men are more intereseted in cars than women (because they predominantly are) just as women are more likely to comparison shop for quality/selection on furniture and kitchens. It’s called a difference. Look it up

29. If I’m not conventionally attractive, the disadvantages are relatively small and easy to ignore.

More insecurity

30. I can be loud with no fear of being called a shrew. I can be aggressive with no fear of being called a bitch.

Yeah ‘cuase obnoxious guys are soo great to deal with

31. I can ask for legal protection from violence that happens mostly to men without being seen as a selfish special interest, since that kind of violence is called “crime” and is a general social concern. (Violence that happens mostly to women is usually called “domestic violence” or “acquaintance rape,” and is seen as a special interest issue.)

If this is true it’s just dumb. Although one significant problem with domestic violence is women often refuse to press charges or testify against men they are in love with. I can see how that could annoy the crap out of a cop called to a domestic violence after the first time at the same residence

32. I can be confident that the ordinary language of day-to-day existence will always include my sex. “All men are created equal,” mailman, chairman, freshman, he.

I’m sorry but certain words evolved predominantly male, just as others evolved female. If you don’t like it come up with a better solution than “ze” (to replace “he”) and “womyn” or learn another language. Or just deal with the fact than just because the word “man” or “men” is involved it doesn’t mean “male”. It means “human” or “homo sapien”

33. My ability to make important decisions and my capability in general will never be questioned depending on what time of the month it is.

I’m sorry but this one is human nature. If I had a long ongoing on-again-off-again relationship with a woman, and everytime we broke up I was more emotional or grumpty, people would make comments about the likely state of my relationship everytime is said something abrupt or teared up. If a variable is known to cause a change to a given state, people will speculate on the state of the variable when they observe that state. If you can’t deal with it go on one of those birth controll pills that make your period go away

34. I will never be expected to change my name upon marriage or questioned if I don’t change my name.

This is the evolved culture. It’s getting more commen for women to keep thier name. And in ancient China it was a common practice for men to take thier wives name to continue the name if it was more prestigious. So Nah

35. The decision to hire me will never be based on assumptions about whether or not I might choose to have a family sometime soon.

As long as women take more time off then men, this will continue. Either suck it up and stop whining or take less time for your family. If I own a business and it takes $X to train a full time employee and women who have kids tend to not come back to work full time…. Financial sense says to hire men. Although this may not be the correct call, or the “PC” decision, it is a fact of life

36. Every major religion in the world is led primarily by people of my own sex. Even God, in most major religions, is pictured as male.

True. But realy, God has had some serious anger management issues. If God was depiced as a she feminists would whine about how it furthered the image of PMS induced insanity

37. Most major religions argue that I should be the head of my household, while my wife and children should be subservient to me.

Baring domestic violence I have yet to see a “subservient” wife

38. If I have a wife or live-in girlfriend, chances are we’ll divide up household chores so that she does most of the labor, and in particular the most repetitive and unrewarding tasks. (More).

I belive this has more to do with women wanting a cleaner house than men. Apparently people that don’t think a messy kitchen is a problem don’t like to clean the kitchen when it’s just a little messy! Shocking

39. If I have children with a wife or girlfriend, chances are she’ll do most of the childrearing, and in particular the most dirty, repetitive and unrewarding parts of childrearing.

See #38, and add lazyness and procrastination. If I can get away with it I will

40. If I have children with a wife or girlfriend, and it turns out that one of us needs to make career sacrifices to raise the kids, chances are we’ll both assume the career sacrificed should be hers.

See #36. Again, as long as women take more time off, they’ll be assumed to take more time off.

41. Magazines, billboards, television, movies, pornography, and virtually all of media is filled with images of scantily-clad women intended to appeal to me sexually. Such images of men exist, but are rarer.

See #s $ about men being attracted to visual representations. This is why men have Pornomags with pictures (which you have to be 18-21 to purchase) and women have “romance” novels which are about as graphic (available to any age purchaser, hint hint boys, just buy romance novels, they’re graphic as all get out and they’ll sell then to you)

42. In general, I am under much less pressure to be thin than my female counterparts are. (More). If I am fat, I probably suffer fewer social and economic consequences for being fat than fat women do. (More).

Again with the visual attraction

43. If I am heterosexual, it’s incredibly unlikely that I’ll ever be beaten up by a spouse or lover. (More).

True, however now that we have the term “emotional abuse” in the lexicon, guess who does that more?

44. Complete strangers generally do not walk up to me on the street and tell me to “smile.” (More: 1 2).

WTF? Seriously? I don’t even get what this one is about. For me it’s my family telling me to “smile”

45. On average, I am not interrupted by women as often as women are interrupted by men.

OMG I’m interrupted by constantly by women, although I don’t have any data about relative frequency

46. I have the privilege of being unaware of my male privilege.

This is BS again. This is the crap about feminism that pisses me off. There are valid complaints about sexism, valid points about the relative safety between men and women, but when feminists go off on these “Aha! But you can’t even DETECT when you’re getting something better than a woman ever could just because you’re a man!” rants I lose all respect for the ranter in question. Point it out. If people disagree with you odds are either you’re talking to an asshat or you’re not 100% correct

Fieros are gooooood

I bought a fiero a while back… and I’m This | | far away from legaly owning it… and being able to drive it even. horray. But the down side is i have to speek to a lawyer. ack.

Anyway, the gian sun servers ate $300 of electricity last bill so i had to turn them off and i lost all my sun points for the month. I’m no longer a nerd.