Re: Bug in egrep?

2006-09-07 Thread Oliver J. Morais
* Otto Moerbeek [EMAIL PROTECTED] [060907 17:44]:
 If anybody has access to a Solaris machine, I like to know what the
 test does there.

SunOS XX 5.9 Generic_118558-17 sun4u sparc SUNW,Sun-Fire-V240

#  echo some text here | egrep -x  ; echo $?
egrep: illegal option -- x
usage: egrep [ -bchilnsv ] [ -e exp ] [ -f file ] [ strings ] [ file ] ...
2

#  echo some text here | /usr/xpg4/bin/egrep -x  ; echo $?
1



Re: Know CPU usage

2006-08-28 Thread Oliver J. Morais
* Abel Talaversn Estevez [EMAIL PROTECTED] [060828 11:45]:
 Does anybody know any other command?

Quick'n'dirty:
ps -ax -opcpu  | awk '!/%CPU/{sum += $1} END {print sum}'



Re: Crash after halt -p (i386, current of feb. 5th)

2006-02-18 Thread Oliver J. Morais
For the archives:
Tried again with sysctl machdep.apmhalt=1, same game :-/

# halt -p
/etc/rc.shutdown in progress...
/etc/rc.shutdown complete.
syncing disks... done

Attempting to power down...
apm0: APM set power state: unrecognized device ID (9)
uvm_fault(0xd6930298, 0x8000, 0, 1) - e
kernel: page fault trap, code=0
Stopped at  trap+0x15f: movzbl  0(%edx),%eax
ddb ps
   PID   PPID   PGRPUID  S   FLAGS  WAIT   COMMAND
*31535  1  31535  0  7  0x4006 halt
12  0  0  0  30x100204  crypto_wa  crypto
11  0  0  0  30x100204  aiodoned   aiodoned
10  0  0  0  30x100204  syncer update
 9  0  0  0  30x100204  cleanercleaner
 8  0  0  0  30x100204  reaper reaper
 7  0  0  0  30x100204  pgdaemon   pagedaemon
 6  0  0  0  30x100204  pftm   pfpurge
 5  0  0  0  30x100204  usbtsk usbtask
 4  0  0  0  30x100204  usbevt usb0
 3  0  0  0  30x100204  apmev  apm0
 2  0  0  0  30x100204  kmallockmthread
 1  0  1  0  3  0x4084  wait   init
 0 -1  0  0  3 0x80204  scheduler  swapper
ddb trace
trap() at trap+0x15f
--- trap (number 4) ---
0x893d:
ddb



ping: sendto: No buffer space available

2006-02-15 Thread Oliver J. Morais
i386, OpenBSD 3.9-beta (GENERIC) #597: Sun Feb  5 21:14:35 MST 2006

Just played around pinging to see the following:

Pinging from box A (10.0.0.13) to box B (10.0.0.5) with
sudo ping -f -s 1024 10.0.0.5
Everything fine. Fire up another xterm, fire up the same ping a
second time - wow.

[...]
ping: sendto: No buffer space available
ping: wrote 10.0.0.5 1032 chars, ret=-1
ping: sendto: No buffer space available
ping: wrote 10.0.0.5 1032 chars, ret=-1
ping: sendto: No buffer space available
ping: wrote 10.0.0.5 1032 chars, ret=-1
ping: sendto: No buffer space available
ping: wrote 10.0.0.5 1032 chars, ret=-1
ping: sendto: No buffer space available
ping: wrote 10.0.0.5 1032 chars, ret=-1
ping: sendto: No buffer space available
ping: wrote 10.0.0.5 1032 chars, ret=-1
ping: sendto: No buffer space available
ping: wrote 10.0.0.5 1032 chars, ret=-1
ping: sendto: No buffer space available
ping: wrote 10.0.0.5 1032 chars, ret=-1
.ping: sendto: No buffer space available
ping: wrote 10.0.0.5 1032 chars, ret=-1
.ping: sendto: No buffer space available
ping: wrote 10.0.0.5 1032 chars, ret=-1
ping: sendto: No buffer space available
ping: wrote 10.0.0.5 1032 chars, ret=-1
.ping: sendto: No buffer space available
ping: wrote 10.0.0.5 1032 chars, ret=-1
ping: sendto: No buffer space available
ping: wrote 10.0.0.5 1032 chars, ret=-1
.ping: sendto: No buffer space available
ping: wrote 10.0.0.5 1032 chars, ret=-1
ping: sendto: No buffer space available
ping: wrote 10.0.0.5 1032 chars, ret=-1
.ping: sendto: No buffer space available
ping: wrote 10.0.0.5 1032 chars, ret=-1
..ping: sendto: No buffer space available
ping: wrote 10.0.0.5 1032 chars, ret=-1
ping: sendto: No buffer space available
ping: wrote 10.0.0.5 1032 chars, ret=-1
[...]

And so on... As soon as I kill one floodping, the other runs fine
again. Box A has a fxp0, box B a re0, connected via a cheap Gigabit Switch.
(Just drop a line if you need the full dmesg.)

Not that I'm too concerned since this isn't a real world problem to
me, but hey, who knows ;-)

kind regards,
oliver



Crash after halt -p (i386, current of feb. 5th)

2006-02-14 Thread Oliver J. Morais
Little @home-server, Mainboard is a Gigabyte GA-5AX F3, Bios is AWARD
Version 4.51PG (Everything set to default.)

Perfect box until you try to do a halt -p ;-)

Below see ps and trace from ddb and dmesg.

# halt -p
/etc/rc.shutdown in progress...
/etc/rc.shutdown complete.
syncing disks... done

Attempting to power down...
apm0: APM set power state: unrecognized device ID (9)
apm0: APM set power state: unrecognized device ID (9)
uvm_fault(0xd692a6e4, 0x8000, 0, 1) - e
kernel: page fault trap, code=0
Stopped at  trap+0x15f: movzbl  0(%edx),%eax
ddb ps
   PID   PPID   PGRPUID  S   FLAGS  WAIT   COMMAND
* 4526  1   4526  0  7  0x4006 halt
12  0  0  0  30x100204  crypto_wa  crypto
11  0  0  0  30x100204  aiodoned   aiodoned
10  0  0  0  30x100204  syncer update
 9  0  0  0  30x100204  cleanercleaner
 8  0  0  0  30x100204  reaper reaper
 7  0  0  0  30x100204  pgdaemon   pagedaemon
 6  0  0  0  30x100204  pftm   pfpurge
 5  0  0  0  30x100204  usbtsk usbtask
 4  0  0  0  30x100204  usbevt usb0
 3  0  0  0  30x100204  apmev  apm0
 2  0  0  0  30x100204  kmallockmthread
 1  0  1  0  3  0x4084  wait   init
 0 -1  0  0  3 0x80204  scheduler  swapper
ddb trace
trap() at trap+0x15f
--- trap (number 4) ---
0x893d:
ddb 

ddb boot reboot
rebooting...
 OpenBSD/i386 BOOT 2.10
boot 
booting hd0a:/bsd: 4961800+867752 [52+255888+237123]=0x607b2c
entry point at 0x100120

[ using 493436 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2006 OpenBSD. All rights reserved.  http://www.OpenBSD.org

OpenBSD 3.9-beta (GENERIC) #597: Sun Feb  5 21:14:35 MST 2006
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: AMD-K6(tm) 3D processor (AuthenticAMD 586-class) 351 MHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,MCE,CX8,PGE,MMX
real mem  = 536387584 (523816K)
avail mem = 482430976 (471124K)
using 4278 buffers containing 26923008 bytes (26292K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(c7) BIOS, date 11/16/99, BIOS32 rev. 0 @ 0xfb4c0
apm0 at bios0: Power Management spec V1.2
apm0: AC on, battery charge unknown
apm0: flags 70102 dobusy 1 doidle 1
pcibios0 at bios0: rev 2.1 @ 0xf/0xb948
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdef0/160 (8 entries)
pcibios0: PCI Exclusive IRQs: 5 9 10
pcibios0: PCI Interrupt Router at 000:07:0 (Acer Labs M1533 ISA rev 0x00)
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xc/0x8800 0xcc000/0x4600
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 Acer Labs M1541 PCI rev 0x04
ppb0 at pci0 dev 1 function 0 Acer Labs M5243 AGP/PCI-PCI rev 0x04
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 Matrox MGA G400/G450 AGP rev 0x82
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
ohci0 at pci0 dev 2 function 0 Acer Labs M5237 USB rev 0x03: irq 11, version 
1.0, legacy support
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: Acer Labs OHCI root hub, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
pcib0 at pci0 dev 7 function 0 Acer Labs M1533 ISA rev 0xc3
pciide0 at pci0 dev 9 function 0 CMD Technology PCI0680 rev 0x02
pciide0: bus-master DMA support present
pciide0: channel 0 configured to native-PCI mode
pciide0: using irq 5 for native-PCI interrupt
wd0 at pciide0 channel 0 drive 0: IBM-DTLA-305020
wd0: 16-sector PIO, LBA, 19623MB, 40188960 sectors
wd1 at pciide0 channel 0 drive 1: WDC WD2000BB-00DWA0
wd1: 16-sector PIO, LBA48, 190782MB, 390721968 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
wd1(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 5
pciide0: channel 1 configured to native-PCI mode
re0 at pci0 dev 10 function 0 Realtek 8169 rev 0x10: irq 9, address 
00:09:5b:e0:eb:47
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 0
wi0 at pci0 dev 12 function 0 Intersil PRISM2.5 rev 0x01: irq 10
wi0: PRISM2.5 ISL3874A(Mini-PCI) (0x8013), Firmware 1.0.7 (primary), 1.3.6 
(station), address 00:09:5b:2f:6e:42
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pmsi0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pmsi0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
spkr0 at pcppi0
sysbeep0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
npx0 at isa0 port 0xf0/16: using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pccom0: console
pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
fdc0 at isa0 port 

Re: Output of top - CPU% weirdness?

2005-07-03 Thread Oliver J. Morais
* Arnaud Bergeron [EMAIL PROTECTED] [050703 03:09]:
 All it takes to find that out is a little bit of observation and
 deduction.  From the second output you provided you should see md5's
 CPU usage go up rapidly.

No. md5's CPU doesn't go up. If I try john -t it slowly goes up.

Let's stick with john -t 'cause it's real CPU hog.

top(1) output show a CPU-Usage going up slowly, showing different numbers
than ps(1).

load averages:  1.80,  1.15,  0.68
09:25:13
51 processes:  1 running, 49 idle, 1 on processor
CPU states: 97.0% user,  0.0% nice,  2.5% system,  0.5% interrupt,  0.0% idle
Memory: Real: 45M/116M act/tot  Free: 374M  Swap: 0K/1024M used/tot

  PID USERNAME PRI NICE  SIZE   RES STATEWAIT TIMECPU COMMAND
 7399 moo   640 3208K  952K run  -0:10 36.47% john
13289 moo20   18M   22M sleepselect   0:21  0.05% Xorg
16577 moo20 2924K 3588K sleepselect   0:08  0.00% xterm
13376 moo   100 4332K 2832K idle wait 0:00  0.00% mutt
26326 moo20 3000K 3600K sleepselect   0:00  0.00% xterm

$ while true; do ps -ax -opcpu -ocommand | grep john | grep -v grep ; sleep 1; 
done 
45.0 john -t
71.8 john -t
80.9 john -t
85.0 john -t
87.8 john -t
89.6 john -t
90.7 john -t
91.7 john -t
92.1 john -t
92.6 john -t
93.1 john -t
93.5 john -t
93.9 john -t

And these numbers were taken parallel in two xterm, so 36.47%
from top(1) showed up wile ps(1) was reporting 90+ percent CPU.

   Now, if you're not happy with that, you're
 welcome to fix it yourself

As always... Too bad I'm not a developer.



Re: German Umlauts

2005-07-02 Thread Oliver J. Morais
* Hugo Villeneuve [EMAIL PROTECTED] [050702 00:15]:
 What you want is:
 set +o emacs-usemeta

Perfect :-) Thank you.

 I couldn't find your others -meta options in ksh(1)

Some BASHisms I tried (Found them while googling.), I removed them
now.



Output of top - CPU% weirdness?

2005-07-02 Thread Oliver J. Morais
OpenBSD 3.7-current (GENERIC) #212: Mon Jun 27 21:48:43 MDT 2005 on i386
Compiling xpdf I see the following top-output (top -S -ocpu 10)

load averages:  1.97,  1.55,  0.97   16:16:04
65 processes:  2 running, 62 idle, 1 on processor
CPU states: 88.5% user,  0.0% nice, 10.0% system,  0.3% interrupt,  1.2% idle
Memory: Real: 62M/124M act/tot  Free: 366M  Swap: 0K/1024M used/tot

  PID USERNAME PRI NICE  SIZE   RES STATEWAIT TIMECPU COMMAND
16836 moo20   19M   23M sleepselect   0:18  0.00% Xorg
   11 root -1800K   26M sleepreaper   0:03  0.00% reaper
10255 moo20 3504K 4280K sleepselect   0:01  0.00% xterm
23656 root  100 8956K 2748K sleepwait 0:00  0.00% make
25307 root  640   19M   11M run  -0:00  0.00% cc1
15256 moo20 7216K 7660K sleeppoll 0:00  0.00% xscreensaver
21127 moo20 3516K 4232K run  -0:00  0.00% xterm
   13 root  1800K   26M sleepsyncer   0:00  0.00% update
 4698 root   20  660K  392K idle kqread   0:00  0.00% apmd
 3048 root   20 1484K 1020K sleepselect   0:00  0.00% sendmail

So: 88.5% User, 10.0% System looks OK, but where are the CPU-consuming processes
in the list?

,[ man top - bugs ]-
| As with ps(1), things can change while ttp is collecting information for
| an update.  The picture it gives is only a close approximation to reality.
`

I don't think an approximation of this scale is correct ;-)

Another try:

,[ md5 -t ]-
| while true; do md5 -t; done
| 
| top output:
| 
| load averages:  1.81,  1.72,  1.48 
16:28:13
| 52 processes:  2 running, 49 idle, 1 on processor
| CPU states:  100% user,  0.0% nice,  0.0% system,  0.0% interrupt,  0.0% idle
| Memory: Real: 48M/109M act/tot  Free: 381M  Swap: 0K/1024M used/tot
| 
|   PID USERNAME PRI NICE  SIZE   RES STATEWAIT TIMECPU COMMAND
| 32635 moo   560 2904K  172K run  -0:00  1.71% md5
| 17994 moo20 3148K 3748K sleepselect   0:00  0.05% xterm
| 16836 moo20   19M   23M sleepselect   0:21  0.00% Xorg
`

100% User but md5 only showing up with 1,71%?

Either I don't see the obvious or there's something broken.



German Umlauts

2005-07-01 Thread Oliver J. Morais
Hi all!

OpenBSD 3.7-current (GENERIC) #212: Mon Jun 27 21:48:43 MDT 2005

I want to use german umlauts in xterm, which works fine using csh
and ksh -o vi but NOT using ksh -o emacs :-( (Umlauts work fine
in other applications like vim, xchat, firefox...)

My ~./profile (Slightly stripped to the relevant parts, umlauts not
working.)

,[ ~/.profile ]-
| TERM=xterm-color
| VISUAL=vim
| export TERM VISUAL
| set -o emacs
| set emacs-usemeta on
| set convert-meta off
| set input-meta on
| set output-meta on
`

As soon as I type set -o vi I have umlauts, Euro-Sign etc. but I'd
really like to use -o emacs instead of -o vi

I'm sure I'm missing some detail, so: cluestick, anyone? :-)



Re: Burn Testing

2005-05-26 Thread Oliver J. Morais
* Gaby vanhegan [EMAIL PROTECTED] [050526 17:31]:
 Ouch ;-)  for x in `jot 24 1` is better I think ;-)
 I tried to use seq, but it wasn't there.  Quick to write the numbers 
 than search the man page...

/usr/ports/misc/sh-utils  if you want (g)seq, but jot is fine.