Short script for searching mail logs

Today I had to search through dozens of mail logs (syslog) located on several mail relays and find all entries related to a particular user.

Given:

  • All servers are managed via a remote tty console,
  • The ksh-script must be copy&pasteable
  • All logs are gzipped
  • I need all entries with the same message number (the ninth field) as the found log entry

This is what I came up with:

Continue reading “Short script for searching mail logs”

Wine 1.1.5 for Solaris

Wine 1.1.5 is out. So are new compiling errors:

gmake[2]: Entering directory `/var/tmp/wine-1.1.5/dlls/cryptnet’
gcc -c -I. -I. -I../../include -I../../include -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith -O2 -o cryptnet_main.o cryptnet_main.c
In file included from cryptnet_main.c:31:
../../include/winbase.h:1518: error: syntax error before “va_list”
../../include/winbase.h:1519: error: syntax error before “va_list”
gmake[2]: *** [cryptnet_main.o] Error 1
gmake[2]: Leaving directory `/var/tmp/wine-1.1.5/dlls/cryptnet’
gmake[1]: *** [cryptnet] Error 2
gmake[1]: Leaving directory `/var/tmp/wine-1.1.5/dlls’
gmake: *** [dlls] Error 2

The thing is, wine/debug.h must be included before any other win*.h headers in dlls/cryptnet/cryptnet_main.c

$ more dlls/cryptnet/cryptnet_main.c
. . .
#include “wine/debug.h”
#include “windef.h”
#include “winbase.h”
#include “winnt.h”
#include “winnls.h”
#include “wininet.h”
#include “objbase.h”
#define CERT_REVOCATION_PARA_HAS_EXTRA_FIELDS
#include “wincrypt.h”
. . .

DNS, IP, AS, whois etc testers

  • Squish DNS (A, SOA, CNAME, NS, PTR, AAAA. ANY) tester
  • What’s my DNS DNS propagation tester
  • DNS-OARC Web-based DNS randomness test
  • Robtex RBL Realtime Block List, Domain Name Server records, IP Reverse DNS, C-Network, Domain
  • Whois, Route, AS Analysis, DNS graphs
  • DNSstuff IP, whois, country IP, traceroute, VectorTrace, DNS traversal, Speed tests, HTML validator
  • What’s my IP IP, DNS, whois, traceroute testers, port scanner
  • w3dt DNS lookup, DNS traversal, PortScan, trace route, RBL check, MTU route, NTP test, remote process list
  • Into DNS

CPU power management

Some CPU’s and system boards allow you to change operating voltage and frequency, resulting in a corresponding change in performance, and power consumed.

To test what frequencies are supported:

# kstat -m cpu_info -s supported_frequencies_Hz
module: cpu_info instance: 0
name: cpu_info0 class: misc
supported_frequencies_Hz 2000000000:2667000000module: cpu_info instance: 1
name: cpu_info1 class: misc
supported_frequencies_Hz 2000000000:2667000000module: cpu_info instance: 2
name: cpu_info2 class: misc
supported_frequencies_Hz 2000000000:2667000000

module: cpu_info instance: 3
name: cpu_info3 class: misc
supported_frequencies_Hz 2000000000:2667000000

In this example (Xeon x5355), two frequencies are supported: 2.000 and 2.667 GHz

What is the current frequency:

# kstat -m cpu_info -s current_clock_Hz
module: cpu_info instance: 0
name: cpu_info0 class: misc
current_clock_Hz 2000000000module: cpu_info instance: 1
name: cpu_info1 class: misc
current_clock_Hz 2000000000

module: cpu_info instance: 2
name: cpu_info2 class: misc
current_clock_Hz 2667000000

module: cpu_info instance: 3
name: cpu_info3 class: misc
current_clock_Hz 2667000000

In this example, two cores are running at 2.00GHz and two at 2.667GHz

To enable CPU power management add the following lines to /etc/power.conf and let pmconfig reread the config:

# vi /etc/power.conf
...
cpupm enable
cpu-threshold 1s
...
# pmconfig
#

Or download and install powertop. When you start it, press “p” to enable CPU power management.

Using dtpower:

To be able run dtpower as a superuser (only) edit /etc/default/power:

# vi /etc/default/power
. . .
PMCHANGEPERM=-
CPRCHANGEPERM=-
. . .
#

ATTENTION: If you have an ASUS DSBF motherboard you need to upgrade the BIOS to AT LEAST version 1004. Older revisions do not support multiple frequencies.

Additional information: