Zach Shepherd's WordPress Blog

Just another WordPress weblog

Tuesday, April 21, 2009

Styled output (unix c/c++)

After seeing a program that had colored and styled (bold) output, I decided to look into it. There isn’t a lot of information available, so I’m not sure how widely supported it is. It seems to be compatible with gnome-terminal in a few versions of Ubuntu, but I’m not sure what else (if you try it, let me know).

After a lot of trial-and-error (the tutorials I found were all incomplete), I wrote the following program to output the “code” to style text in any one of 8 colors (with an additional 8 background colors) and 4 styles (plain, bold, underlined, and strikethrough). The output leads me to believe underline is poorly supported (only some text is underlined), but for coloring error messages, this is probably sufficient.

Update: It looks like the proper term for these are ANSI escape codes. When you use the proper term, it’s much easier to find tutorials. I’ll leave this up in case anyone stumbles across it not knowing the proper term.

(more…)

posted by Zach at 7:04 pm  

Wednesday, April 15, 2009

Semester Wrap-up: Projects

I worked on a few projects this semester. Regrettably, most of my time was spent discussing rather than doing. Information about each can be found elsewhere (and in other posts, of course).

posted by Zach at 7:24 pm  

Wednesday, April 15, 2009

Semester Wrap-up: Presentations

There weren’t many presentations given this semester, but I did give on version control using subversion (based on the subversion book) the materials are on docs (pdf).

posted by Zach at 7:12 pm  

Wednesday, April 15, 2009

Production Server Setup: Again

At this evenings lab admin meeting there was a presentations inline with what we were currently working on. Jim Owens presented some ideas in the form of a set of proposals for the ways we manage the lab.

The summary of the discussion was that we’re already consolidating in a similar way to his proposal except that we plan to leave righteous alone (move the “core services” to one of the new xen machines keeping stability and security in mind, “projects” to a separate xen machine, and use the third for unstable projects or development).

posted by Zach at 7:05 pm  

Wednesday, April 15, 2009

Docs Status Update

Docs is still running smoothly; it only had a brief bit of downtime (early morning one day) other than general downtime for power outages and such.

The downtime was linked to an error with the sendmail package that was installed causing many, many processes to be spawned (and woken up every 10 minutes). Ryan and I installed an extra package (sensible-mda) to fix the issue.

Backups are still being made on a regular basis, and minutes are being uploaded regularly (although they haven’t been taken as much this semester).

posted by Zach at 7:05 pm  

Wednesday, April 15, 2009

Benchvm Status Update

Regrettably it was another low-progress semester for Benchvm. I haven’t abandoned it, but have been rather busy.

posted by Zach at 7:04 pm  

Wednesday, April 15, 2009

SVN Status

The subversion server is still up and running. There have been several repositories and acconts created. Nightly backups (incremental on Monday-Saturday and complete on Sunday) have been added.

posted by Zach at 7:03 pm  

Wednesday, April 15, 2009

Production Server Setup

One of my goals for this semester was to help setup and document the new production servers. There was poor communication prior to work being done; the Xeon machines were set once, but had problems with software RAID and then they were set up again, but then there was a discussion about whether we knew enough about CentOS. The storage machines were set up using OpenSolaris, but then there was a discussion about whether we knew enough about using that. Mirror was set up, and used briefly, but then we reverted back to the old system for various reasons.

Overall, it was a learning experience, but not a productive one. The machines are assembled physically, which was useful, but a relatively small task. A little was learned about OpenSolaris and ZFS and a little was learned about software RAID, but, as of now, we still aren’t any closer to reaching a decision on how we’re going to set up the system and we still have a lot of work to do.

posted by Zach at 2:07 pm  

Powered by WordPress