Archive

Archive for March, 2007

Poor PHP

March 21st, 2007

Well, as mentioned below, today I was doing a little research. On the futility of a Computer Science major. Specifically, on the fact that the overwhelming odds are that in a career in IT, system administration, or even web programming, I’ll probably never apply 90% of what I learn in CS courses.

So, I went looking for online certificate programs, knowing that most of the vendors’ programs run $500 or more just for testing. I came by eCertificates.com. And this brings me to another topic… I clicked on the “Software Programming” category, and was surprised to see no PHP test. On a hunch, I looked under “Web Design”, and sure enough, there it was.

I know this is a common misconception, and I know that because it plays so well with the web, and Apache, PHP has been pigeonholed as a web language. Maybe I’m just crazy, or maybe it’s just because I know PHP better than anything else. But PHP is NOT a web programming language. It is a programming language that happens to work very well with web applications.

Using fread() and fwrite() I can slam together a command-line menu-based PHP script for administration quicker than I could write the def’s for a Python script. I’ve done it, I have a number of PHP CLI-based scripts running on my machines. Database access with PHP is a no-brainer. And one day, when I get around to reading my “ancient” pile of books and learning NCurses, PHP will be right there with me.

So I guess it is just a fact of the modern web mentality. But PHP has myriad uses aside from web applications and web content handling. Sure, my web site is written in it. But one of my backup scripts is, too. And more importantly, if I’m working with a database that already has a PHP-based web frontend, PHP seems like the natural choice for a CLI-based administration backend.

Miscellaneous Geek Stuff , , , ,

Computer Science?

March 21st, 2007

So, I’m a computer science major at Rutgers. What is computer science? And WHY is it my major?

I was recently reading an excellent article online, by Neil McBride, a principal lecturer in the School of Computing, De Montfort University, UK. The Death of Computing essentially speaks to the fact that the IT industry is different now than it ever was in the past – IT is no longer a programingdiscipline. Just look at job listings in IT, whether as upper-level managers or summer interns. How many of them demand the degree of skills in, say, Java, that are taught in CS classes? Most of them ask for Python, Ruby, PHP, maybe some Java. But more importantly, the jobs aren’t programming-centric. As many have said, all of the software that’s needed is already out there. The modern emphasis in IT is on providing a service – on SLAs, uptime, optimization, security, and incident response. Not on developing new systems in low-level languages, but in synthesizing many assets into a coherent, high-availability system with as much transparency to the user as possible.

Just have a look at the Rutgers CS course catalog: Data structures, Discreet structures, numerical methods, design and analysis of algorithms, compilers, operating systems design, artificial intelligence. Sure, that’s nice. Where is something that will prepare me for a career?

Not one course in an overview of Information Technology. Where’s networking? Where’s systems management/administration? How about a course in embedded systems design, or internet/intranet security? There’s not even an intro course to Unix.

Yes, these courses provide lots of information so I can know what my computer is doing at every step of the way. But why do I need a semester of algorithm design when there’s a world of open-source software at my fingertips? Why should I know operating system design, when 99% of it is done by a relatively small group of people?

It seems to be just what Mr. McBride mentioned in his article – at least here at Rutgers, they are trying to haul up the drawbridge, to educate a small minority of elite programmers. Where are the skills that myself, and people my age, need when looking for a job? Internet applications, firewall/router design, embedded systems, languages like Python, Ruby, Perl, and other scripting languages that allow me to quickly and efficiently accomplish a task? Is it really true that a degree in CS is actually just “a degree”, a prerequisite for a job, and everything else should be learned on our own?

My data structures class is a perfect example. One of our projects was using Java and Linked Lists to implement a crude example of string comparison in a security application. Why would I do that when I can store the data in a MySQL database and write a simple script to perform comparisons? There’s not even an introductory systems course. Are we really aiming to educate programmers who have never seen a tape drive, who have never had an introduction to scripting languages, how to perform a good system backup, or how to secure their workstations?

Higher Education, Ideas and Rants

APC AP9605 PowerNet SNMP Card

March 1st, 2007

In the theme of upgrades, I also purchased two APC SmartUPS1000 units from refurbUPS.com. Now, I know that a lot of people are perfectly happy with serial connectivity. And it has its positives. But I’m running 2-3 servers per UPS, older servers, wanted to be able to monitor the UPSs, and perhaps control server shutdown, over the network.. So, I found that refurbUPS.com also sells SNMP management cards for them. They sell a refurbished AP9605 – it’s an old 10BaseT PowerNet SNMP-only card (with telnet management). Seemed good, and the price of $15 was right.

They showed up, but I couldn’t find much about them online, let alone anything useful.

After a phone call to APC, I managed to get the user’s manual emailed to me. The few instructions I found online were totally wrong.

The general setup goes like this:

  1. Connect network cable to card.
  2. Connect serial cable between a computer and the UPS’s serial port.
  3. Get a terminal emulator, like minicom. Speed is 2400bps.
  4. connect and press enter. You’ll be asked for a username and password. Use “apc” for both.
  5. 5) Setup the network – IP, mask, gateway, etc.
  6. Ready-to-go!

I also have some information about the card on my wiki at: AP9605.

Tech HowTos , , , ,

Managing G1 Proliant Servers with modern Linux

March 1st, 2007

Not much of an “upgrade” for anyone who’s in IT, but jasonantman.com is currently being upgraded from old desktops used as servers to a pile of generation-1 (G1) HP/Compaq Proliants. I know that there are utilities for Linux to manage the servers, specifically control fan speed and monitor hardware-level health for Linux. However, the most recent download on HP’s site is for SLES9. All of my boxes will be running openSuSE 10.2, and the SLES9 version wouldn’t install on them.

After an hour long phone call to HP support, I ended up speaking with Paulo, the third support person I was transferred to. #1 read off the web site, #2 knew what Linux was, but Paulo (#3) actually told me that he was experimenting with installing HPASM (HP’s server administration/management utility) on an older Proliant as well. He spent about half an hour walking me through it. Here’s what I found:

The most compatible version of HPASM (I guess it’s some hidden feature for people who know it) is the version for the DL380 G4. Paulo instructed me to download this RPM from their site. I did, choosing the SLES10 (x86) download (hpasm-7.7.0-115.sles10.i586.rpm). This installed fine. Running hpasm status from the command line asks us to activate it first. Do the activation. Now, running hpasm status still asks us to activate. Paulo confirmed this as happening on his machine too. Try /etc/init.d/hpasm status and you should see that all of the modules are working.

Now, the install is complete. I’m not sure if the SNMP works, but it should as long as your snmpd is running. The hpasm activate command modifies snmpd.conf appropriately. and you will be queried for the currect configuration information.

To give it a test, run hplog -f or hplog -p and you should see fan and power status, respectively.

Paulo also told me that I could download the hpadu package (also DL380 G4 / SLES10) to get array diagnostics, He warned me that some of the install scripts in HPADU look for the web management homepage, which we haven’t installed. To get around this, install the HPADU RPM file (hpadu-7.70-12.linux.rpm) rpm -ivh --force --nodeps --noscripts hpadu-7.70-12.linux.rpm. Be aware, though, that this package is supposed to be web-based. It installs to /opt/hp/hpadu.

The web interface, luckily for me, is written in PHP. It is pretty complex so it might take me a while to figure out the workings, but when I do, I’ll post as much info as I can on how to make a CLI interface, or where one exists if I can find it.

Also, I’ll most likely develop a Python check script to use with Nagios to monitor most of the hpasm-enabled components.

For the use of anyone else, here are some of the links that HP Support sent me after the call:

Link for users guide for Proliant Support Pack, which includes documentation on HPASM from the CLI:

http://h18000.www1.hp.com/support/files/server/us/WebDoc/720/psp-users-guide.pdf

Product manuals:

http://h20180.www2.hp.com/apps/Nav?h_pagetype=s-003&h_lang=en&h_cc=us&h_product=241435&h_page=hpcom&h_client=z-a-r1002-3&cc=us&lang=en

ML370 G1

http://h20000.www2.hp.com/bc/docs/support/UCR/SupportManual/TPM_143091-004/TPM_143091-004.pdf

Tech HowTos , , , , , , ,