Blog O' Matty


Firefox HTTP header plugin

This article was posted by Matty on 2005-11-05 10:19:00 -0400 -0400

If you are periodically tasked with debugging web applications, you may have heard of the Firefox HTTP Live Headers plug-in. This plug-in is useful for displaying HTTP request and response headers, and allows regular expressions to be used to control which pages and content are retrieved. I can’t figure out if I like this plug-in or the greasemonkey plug-in better. Choices Choices!

Testing SSL services

This article was posted by Matty on 2005-11-05 10:13:00 -0400 -0400

If you manage web applications and servers, you may have encountered a poorly written application or a web server that periodically hangs for no reason. These issues usually pop up out of the blue, and most people rely on their user community to notifiy them when problems are detected. To ensure timely notifications when these problems occur, I developed ssl-service-check. ssl-service-check is written in Bourne shell, and uses the OpenSSL toolkit to connect to a service and issue a “GET /.” If the service fails to respond, ssl-cervice-check will log an error to syslog and send an e-mail to the address defined in the global ADMINS variable. To test if the prefetch.net web server is handling requests on TCP port 444, we can execute ssl-service-check with the “-s” (server to connect to) and “-p” (port number to connect to) options:

$ ssl-service-check.sh -s mail.prefetch.net -p 444

$ tail -1 /var/adm/messages

Nov 3 18:23:28 tigger matty: [ID 702911 daemon.notice] Failed to connect to mail.prefetch.net on Port 444

ssl-service-check was written to work with cron, and can easily be integrated with a network monitoring solution.

Viewing t.v. program listings

This article was posted by Matty on 2005-11-05 09:59:00 -0400 -0400

While checking my daily news sources, I came across a review of several opensource t.v. program listing applications. If freeguide adds a search feature in a future release, I will definitely check it out (that way I can easily locate Seinfeld reruns).

Adding mirrors to Veritas Volume Manager volumes

This article was posted by Matty on 2005-11-03 19:11:00 -0400 -0400

One of the cool features of Veritas Volume Manager (VxVM) is it’s ability to change the layout of a volume on the fly with vxasssist(1m). This option has helped me numerous times, especially when I needed to mirror volumes that weren’t mirrored. Given the following unmirrored striped volume:

$ vxprint -hft

Disk group: oradg

DG NAME NCONFIG NLOG MINORS GROUP-ID
ST NAME STATE DM_CNT SPARE_CNT APPVOL_CNT
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
CO NAME CACHEVOL KSTATE STATE
VT NAME NVOLUME KSTATE STATE
V NAME RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
SC NAME PLEX CACHE DISKOFFS LENGTH [COL/]OFF DEVICE MODE
DC NAME PARENTVOL LOGVOL
SP NAME SNAPVOL DCO

dg oradg default default 10000 1127240283.19.winnie

dm c1t1d0 c1t1d0s2 auto 2048 35521408 -
dm c1t2d0 c1t2d0s2 auto 2048 35521408 -
dm c1t3d0 c1t3d0s2 auto 2048 35521408 -
dm c1t4d0 c1t4d0s2 auto 2048 35365968 -
dm c1t5d0 c1t5d0s2 auto 2048 35521408 -
dm c1t6d0 c1t6d0s2 auto 2048 35521408 -

v oravol01 - ENABLED ACTIVE 20971520 SELECT oravol01-01 fsgen
pl oravol01-01 oravol01 ENABLED ACTIVE 20971776 STRIPE 3/128 RW
sd c1t1d0-01 oravol01-01 c1t1d0 0 6990592 0/0 c1t1d0 ENA
sd c1t2d0-01 oravol01-01 c1t2d0 0 6990592 1/0 c1t2d0 ENA
sd c1t3d0-01 oravol01-01 c1t3d0 0 6990592 2/0 c1t3d0 ENA

We can easily add a mirror by invoking vxassist(1m) with the “mirror” option:

$ vxassist mirror oravol01 layout=stripe ncol=3 &

The mirror option accepts a layout option and several keywords to control the layout of the new mirror. In this example we used a 3-column striped plex to match the layout of the existing plex. After the mirror operation completes, the volume will contain a second plex (the mirror) that matches the original:

$ vxprint -hft

Disk group: oradg

DG NAME NCONFIG NLOG MINORS GROUP-ID
ST NAME STATE DM_CNT SPARE_CNT APPVOL_CNT
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
CO NAME CACHEVOL KSTATE STATE
VT NAME NVOLUME KSTATE STATE
V NAME RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
SC NAME PLEX CACHE DISKOFFS LENGTH [COL/]OFF DEVICE MODE
DC NAME PARENTVOL LOGVOL
SP NAME SNAPVOL DCO

dg oradg default default 10000 1127240283.19.winnie

dm c1t1d0 c1t1d0s2 auto 2048 35521408 -
dm c1t2d0 c1t2d0s2 auto 2048 35521408 -
dm c1t3d0 c1t3d0s2 auto 2048 35521408 -
dm c1t4d0 c1t4d0s2 auto 2048 35365968 -
dm c1t5d0 c1t5d0s2 auto 2048 35521408 -
dm c1t6d0 c1t6d0s2 auto 2048 35521408 -

v oravol01 - ENABLED ACTIVE 20971520 SELECT - fsgen
pl oravol01-01 oravol01 ENABLED ACTIVE 20971776 STRIPE 3/128 RW
sd c1t1d0-01 oravol01-01 c1t1d0 0 6990592 0/0 c1t1d0 ENA
sd c1t2d0-01 oravol01-01 c1t2d0 0 6990592 1/0 c1t2d0 ENA
sd c1t3d0-01 oravol01-01 c1t3d0 0 6990592 2/0 c1t3d0 ENA
pl oravol01-02 oravol01 ENABLED ACTIVE 20971776 STRIPE 3/128 RW
sd c1t4d0-01 oravol01-02 c1t4d0 0 6990592 0/0 c1t4d0 ENA
sd c1t5d0-01 oravol01-02 c1t5d0 0 6990592 1/0 c1t5d0 ENA
sd c1t6d0-01 oravol01-02 c1t6d0 0 6990592 2/0 c1t6d0 ENA

Veritas makes managing storage a snap!

Accessing metadevices in single user mode

This article was posted by Matty on 2005-11-03 19:04:00 -0400 -0400

While perusing Sunsolve today, I came across an infodoc that described how to access metadevices in single user mode. I have never needed to perform this operation, but was happy to learn for future reference! :)