I have recently been on a quest to find a new RSS reader for OS X. NetNewsWire looks to be the leading candidate, since LifeRea doesn’t have a native port to OS X. One thing I noticed in the clients I tested, is that they have fixed times when they will check ALL feeds for new content. This time increment can be in minutes, hours, days, weeks or months. Since several of my feeds get updated 1 - 2 times a month, the fixed time metric doesn’t really work all that well with those sources (especially since the time applies to all feeds). While it may take a bit of additional coding, it would be neat to have syndication clients learn how often feed are updated, and base their syndication checks around that. Hopefully the RSS reader developers will add backoff timers to their clients, which should save bandwidth, and reduce the amount of work each web server needs to do.
MySQL maintains numerous operational metrics (e.g., connections, questions, etc), which can be accessed by running ‘show status’ or one of it’s variants from the mysql client. The mysqlreport Perl script can be used to summarize this data into a nicely formatted report with several useful performance metrics:
$ mysqlreport --user privuser --password password -all
MySQL 5.0.24 uptime 0 10:20:0 Tue Aug 8 01:05:17 2006
__ Key _________________________________________________________________
Buffer usage 77.00k of 64.00M %Used: 0.12
Write ratio 0.04
Read ratio 0.02
__ Questions ___________________________________________________________
Total 3.55k 0.10/s
QC Hits 2.11k 0.06/s %Total: 59.38
DMS 964 0.03/s 27.15
Com_ 240 0.01/s 6.76
COM_QUIT 238 0.01/s 6.70
Slow 0 0.00/s 0.00 %DMS: 0.00
DMS 964 0.03/s 27.15
SELECT 935 0.03/s 26.34 96.99
UPDATE 17 0.00/s 0.48 1.76
INSERT 12 0.00/s 0.34 1.24
REPLACE 0 0.00/s 0.00 0.00
DELETE 0 0.00/s 0.00 0.00
Com_ 240 0.01/s 6.76
change_db 238 0.01/s 6.70
show_variab 1 0.00/s 0.03
show_status 1 0.00/s 0.03
__ SELECT and Sort _____________________________________________________
Scan 566 0.02/s %SELECT: 60.53
Range 44 0.00/s 4.71
Full join 0 0.00/s 0.00
Range check 0 0.00/s 0.00
Full rng join 0 0.00/s 0.00
Sort scan 558 0.01/s
Sort range 49 0.00/s
Sort mrg pass 0 0.00/s
__ Query Cache _________________________________________________________
Memory usage 3.06M of 16.00M %Used: 19.09
Block Fragmnt 0.06%
Hits 2.11k 0.06/s
Inserts 932 0.03/s
Prunes 1 0.00/s
Insrt:Prune 932:1 0.03/s
Hit:Insert 2.26:1
__ Table Locks _________________________________________________________
Waited 0 0.00/s %Total: 0.00
Immediate 1.22k 0.03/s
__ Tables ______________________________________________________________
Open 19 of 128 %Cache: 14.84
Opened 25 0.00/s
__ Connections _________________________________________________________
Max used 2 of 128 %Max: 1.56
Total 240 0.01/s
__ Created Temp ________________________________________________________
Disk table 159 0.00/s
Table 399 0.01/s
File 0 0.00/s
The output from mysqlreport includes metrics on key cache and query cache utilization, the number of operations (SELECT, UPDATE, etc.) performed, thread utilization, connection volumes, table locks, and the types of temporary tables used by sorts. The folks over at hackmysql provide a nice writeup on what each report means, and the typical value ranges you should see in each report. Running mysqlreport is a great way to get a high-level understanding of how a database is performing, and can greatly assist with identifying the areas that are worth reviewing in greater detail.
I came across two interesting storage appliance projects this week:
The openfiler project: http://www.openfiler.com/
The freenas project: http://www.freenas.org/
If your looking for a solution to host numerous terabytes of data at home, these might be for you.
The net-snmp software suite implements the SNMPv1, SNMPv2 and SNMPv3 protocols, and comes with several utilities to remotely retrieve data from servers and network devices. One such utility is snmpstatus, which allows you to retrieve the overall status of a given device:
$ snmpstatus -v 2c -c yikes 10.10.1.1
[10.10.1.7]=>[Content Switch SW Version 07.90 with SNMPv1/v2c Agent] Up: 152 days, 10:47:55.03
Interfaces: 6, Recv/Trans packets: -1275435709/-1122090667 | IP: 58510352/75120061
2 interfaces are down!
Another nifty tool that comes with net-snmp is snmpnetstat, which allows you to get a “netstat”-like view of any device that supports SNMP. The following example show how to retrieve the active and passive UDP and TCP ports from a device:
$ snmpnetstat -v 2c -c yikes -a 10.10.1.1
Active Internet (tcp) Connections (including servers)
Proto Local Address Foreign Address (state)
tcp *.ftp LISTEN
tcp *.ssh LISTEN
tcp *.telnet LISTEN
tcp *.80 LISTEN
tcp *.443 LISTEN
tcp 10.10.1.1.4189 www.youch.net.8080 ESTABLISHED
tcp 10.10.1.1.4190 www.youch.net.8080 ESTABLISHED
Active Internet (udp) Connections
Proto Local Address
udp *.ntp
udp *.snmpd
udp *.1024
udp *.5002
udp *.47806
Snmpstat also allows you to retrieve network statistics with the “-s” option:
$ snmpnetstat -v 2c -c yikes -s 10.10.1.1
ip:
58509607 total datagrams received
0 datagrams with header errors
6068304 datagrams with an invalid destination address
0 datagrams forwarded
0 datagrams with unknown protocol
0 datagrams discarded
52441309 datagrams delivered
75119154 output datagram requests
0 output datagrams discarded
45 datagrams with no route
0 fragments received
0 datagrams reassembled
0 reassembly failures
0 datagrams fragmented
0 fragmentation failures
0 fragments created
icmp:
2634607 total messages received
0 messages dropped due to errors
584 ouput message requests
270 output messages discarded
Output Histogram:
Destination unreachable: 270
Echo Reply: 314
Input Histogram:
Echo Request: 314
Echo Reply: 2634293
tcp:
2476943 active opens
713945482 passive opens
322859 failed attempts
2073710 resets of established connections
694522544 current established connections
-1065832368 segments received
1831139460 segments sent
18 segments retransmitted
tcp:
2476943 active opens
713945482 passive opens
322859 failed attempts
2073710 resets of established connections
694522544 current established connections
-1065832365 segments received
1831139460 segments sent
18 segments retransmitted
udp:
1244436728 total datagrams received
0 datagrams to invalid port
29924 datagrams dropped due to errors
1244436695 output datagram requests
udp:
1244436728 total datagrams received
0 datagrams to invalid port
29924 datagrams dropped due to errors
1244436695 output datagram requests
SNMP is a useful protocol, and I am looking forward to seeing more vendors support SNMPv3.
I have written repeatedly about the problems with the Solaris patch tools, and decided to test out the pca utility after Chris and Frank recommended it so highly. Pca is not only an awesome patching tool, but it blows away everything that is currently offered by Sun (pca has yet to throw Java exceptions and die in mysterious ways). To see what I mean, all you need to do is run pca with the help option:
$ pca -h
Usage: bin/pca [OPTION] .. [OPERAND] ..
Operands:
patch group: missing, installed, all, unbundled, bad
Add r, s or rs at the end to list Recommended,
Security or Recommended/Security patches only.
patch ID: 123456, 123456-78
patch file: 123456-78.zip, 123456-78.tar.Z
file name: patchlist.txt
pattern: /dtmail/
Options:
-l List patches
-L List patches, produce HTML output
-d Download patches
-i Install patches
-I Pretend to install patches
-x Download patch cross-reference file
-y Do not check for updated patch cross-reference file
-X dir Set location of patches cross-reference file
-P dir Set patch download directory
-R dir Set alternative root directory
Install only patches which do not require a reboot-k Make patchadd not back up files to be patched
-G Make patchadd modify packages in the current zone only
-a Ask for SunSolve authentication data interactively
-H Don't display descriptive headers
-r id Display patch README
-f dir Read uname/showrev/pkginfo output from files in dir
-h Display this help
-V Display debug output
-v Display version information
Pca has several modes of operation. It can list patches that are outdated on your system, retrieve patches from Sunsolve, and most importantly it can be used to install individual patches and groups of patches on a server. To list patches that are available for a server, pca can be run with the “-l” option (or “-L” if you want HTML reports):
$ pca -l
Retrieving xref-file to /var/tmp/patchdiag.xref ... done
Using /var/tmp/patchdiag.xref from Jul/14/06
Host: neutron (SunOS 5.10/i386/i86pc)
Patch IR CR RSB Age Synopsis
------ -- - -- --- --- -------------------------------------------------------
117464 01 < 02 --- 2 SunOS 5.10_x86: passwdutil Patch
119131 21 < 22 R-- 4 SunOS 5.10_x86: Sun Fibre Channel Device Drivers
119214 07 < 09 RSB 2 NSS_NSPR_JSS 3.11.2_x86: NSPR 4.6.2 / NSS 3.11.2 / JSS 4.2.4
119471 05 < 06 --- 5 SunOS 5.10_x86: Sun Enterprise Network Array firmware and utilitie
119686 06 < 07 --- 2 SunOS 5.10_x86: lib/svc/bin/svc.startd Patch
120037 03 < 05 --- 2 SunOS 5.10_x86: libldap patch
120053 02 < 03 --- 2 SunOS 5.10_x86: pam library patch
120200 04 < 05 --- 3 SunOS 5.10_x86: sysidtool Patch
121003 02 < 03 --- 2 SunOS 5.10_x86: pax patch
121005 01 < 02 RS- 2 SunOS 5.10_x86: sh patch
121011 01 < 02 --- 2 SunOS 5.10_x86: rpc.metad patch
123327 -- < 01 --- 5 SunOS 5.10_x86: tail patch
123521 -- < 01 --- 2 SunOS 5.10_x86: dirname & basename patch
123525 -- < 01 --- 2 SunOS 5.10_x86: psrinfo patch
The first column lists the patchid, the second column lists the version of the patch installed, the fourth column lists the updated version of the patch that is available on Sunsolve, and the fifth column indicates if the patch addresses a security or reliability problem. To install patches with pca, you can run pca with the “-i” option to install all available patches, or you can install individual patches by passing the patchid(s) to “-i”:
$ pca -i 121005 119214
Retrieving xref-file to /var/tmp/patchdiag.xref ... done
Using /var/tmp/patchdiag.xref from Jul/14/06
Downloading patches to /home/matty
------------------------------------------------------------------------------
Retrieving 119214-09 (1/2) ... done
Retrieving 121005-02 (2/2) ... done
Summary: 2 total, 2 successful, 0 failed
Installing patches
------------------------------------------------------------------------------
Installing 119214-09 (1/2) ... done
Installing 121005-02 (2/2) ... done
Summary: 2 total, 2 successful, 0 skipped, 0 failed
This is a super useful piece of software, and I wish Sun would include something similar in Solaris (smpatch is not the answer!).