Re: A handy utility (at least for me)

2006-08-29 Thread Oliver Fromme
Richard Coleman wrote:
 > Oliver Fromme wrote:
 > > The following is probably the most efficient solution.
 > > It doesn't run into all subdirectories (and works with
 > > an arbitrary numebr of subdirectories).
 > > 
 > > cd /usr/ports; echo */*/work | xargs rm -rf
 > 
 > So does this:
 > 
 > find /usr/ports -mindepth 3 -maxdepth 3 -name work -print -delete -prune
 > 
 > I would be surprised if the globbing in most shells was more
 > efficient than find.

Both are mainly disk-bound, so the runtime should be about
the same, I guess.  (I'm too lazy to do any actual bench-
marks with find and various shells.)
 
 > Although as mentioned before, nothing beats putting all the work
 > directories in a single location, and using a single rm command.

Yes, there is something that beats it:  If you put the work
directories on their own filesystem, you can simply umount
and newfs it, which is probably faster than rm -rf.  If you
use a memory filesystem (md device), it's even sufficient
to just umount it.  I think nothing beats that in terms of
speed.  ;-)

Best regards
   Oliver

-- 
Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

$ dd if=/dev/urandom of=test.pl count=1
$ file test.pl
test.pl: perl script text executable
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: A handy utility (at least for me)

2006-08-29 Thread Bill Vermillion
On Tue, Aug 29, 2006 at 12:00 [EMAIL PROTECTED]
saw "Error reading FAT table? Try SKINNY table?" And promptly
said:

> Date: Mon, 28 Aug 2006 18:18:58 +0200 (CEST)
> From: Oliver Fromme <[EMAIL PROTECTED]>
> Subject: Re: A handy utility (at least for me)

> Rick C. Petty wrote:

>  > Mario Lobo wrote:

>  > > My /usr/ports directory was occuping 24 gigs, of which 20
>  > > was just from the 'work' directories !

> You should type "make clean" more often.  ;-)

And to ensure that 'make clean' in the /usr/ports directory runs
much faster, be sure to add   NOCLEANDEPENDS=YES in your
/etc/make.conf.

After you run that on the entire tree besure to comment it out so
that when you run   make clean   inside a port you clean all the
dependancies too.

Bill

-- 
Bill Vermillion - bv @ wjv . com
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: 6.1-current 20060823 ath0 stuck beacon; resetting (bmiss count 4)

2006-08-29 Thread Jared Mauch
no responses here, any better idea where to go with my problem?

- jared

On Wed, Aug 23, 2006 at 10:33:16PM -0400, Jared Mauch wrote:
> 

-- 
Jared Mauch  | pgp key available via finger from [EMAIL PROTECTED]
clue++;  | http://puck.nether.net/~jared/  My statements are only mine.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: jails, cron and sendmail

2006-08-29 Thread Jared Mauch
On Sat, Aug 26, 2006 at 08:33:18PM -0400, Mike Meyer wrote:
> In <[EMAIL PROTECTED]>, Dirk Engling <[EMAIL PROTECTED]> typed:
> Why are you running cron inside the jails at all? Are you letting your
> users run it? If not, can you disable it, and instead run scripts from
> your real crontab that do the appropriate thigns in each jail?

The way I use jails is i have big-beefy-hardware in colo and 3-5 virtual
"machines" where they get root, etc.. access and it looks almost like
a real host (with a few obvious differences).

Works nicely as backups are done via rsync on the main host
for the most part to a remote site and essentially provides a live image
(outside of some issues with databases and such) on a remote host
to restart the jails should the main hardware have some catastrophic
failure.

May not be the full initial intention, but i've found things
like adjkerntz possibly annoying to have enabled in these setups
by default.. but my list of stuff to turn off/on is fairly set so i
don't have a lot of problems.

- jared

-- 
Jared Mauch  | pgp key available via finger from [EMAIL PROTECTED]
clue++;  | http://puck.nether.net/~jared/  My statements are only mine.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: doadump at pcpu.h:165

2006-08-29 Thread Daniel A.

Daniel A. wrote:

Hi guys,
My server crashes very often and it's very random. So not long ago, I 
was suggested that I read the FreeBSD Handbook pages about kernel 
debugging, and here is the result:

[EMAIL PROTECTED] DIENUB $ kgdb kernel.debug /var/crash/vmcore.3
[GDB will not be able to debug user-mode threads: 
/usr/lib/libthread_db.so: Undefined symbol "ps_pglobal_lookup"]

GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you 
are
welcome to change it and/or distribute copies of it under certain 
conditions.

Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd".

Unread portion of the kernel message buffer:


Fatal trap 28: machine check trap while in kernel mode
instruction pointer = 0x20:0xc06830b0
stack pointer   = 0x28:0xd446ea7c
frame pointer   = 0x28:0xd446ea8c
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 14 (swi1: net)
trap number = 28
panic: machine check trap
Uptime: 1d4h24m37s
Dumping 511 MB (2 chunks)
  chunk 0: 1MB (160 pages) ... ok
  chunk 1: 511MB (130800 pages) 495 479 463 447 431 415 399 383 367 351 
335 319 303 287 271 255 239 223 207 191 175 159 143 127 111 95 79 63 47 
31 15


#0  doadump () at pcpu.h:165
165 __asm __volatile("movl %%fs:0,%0" : "=r" (td));
(kgdb) q


As far as I understand, the issue is CPU-related, but that doesn't make 
sense, as my network interface cards are constantly giving me watchdog 
timeouts.


[EMAIL PROTECTED] include $ uname -a
FreeBSD m00h.dienub.org 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Mon May 29 
20:40:41 CEST 2006 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/DIENUB 
 i386


Thanks for any help. Also, please CC any replies to me.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

[EMAIL PROTECTED] DIENUB $ kgdb kernel.debug /var/crash/vmcore.5
[GDB will not be able to debug user-mode threads: 
/usr/lib/libthread_db.so: Undefined symbol "ps_pglobal_lookup"]

GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
conditions.

Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd".

Unread portion of the kernel message buffer:
panic: softdep_setup_inomapdep: found inode
Uptime: 3h37m58s
Dumping 511 MB (2 chunks)
  chunk 0: 1MB (160 pages) ... ok
  chunk 1: 511MB (130800 pages) 495 479 463 447 431 415 399 383 367 351 
335 319 303 287 271 255 239 223 207 191 175 159 143 127 111 95 79 63 47 
31 15


#0  doadump () at pcpu.h:165
165 __asm __volatile("movl %%fs:0,%0" : "=r" (td));
(kgdb) bt
#0  doadump () at pcpu.h:165
#1  0xc064dda5 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:402
#2  0xc064e03c in panic (fmt=0xc08b7de8 "softdep_setup_inomapdep: found 
inode")

at /usr/src/sys/kern/kern_shutdown.c:558
#3  0xc079639b in softdep_setup_inomapdep (bp=0xcd81bb60, ip=0x0, 
newinum=3639)

at /usr/src/sys/ufs/ffs/ffs_softdep.c:1519
#4  0xc0788cea in ffs_nodealloccg (ip=0xc3b36a50, cg=0, ipref=3639, 
mode=33152)

at /usr/src/sys/ufs/ffs/ffs_alloc.c:1762
#5  0xc0787458 in ffs_hashalloc (ip=0xc3b36a50, cg=0, pref=105, size=33152,
allocator=0xc0788658 )
at /usr/src/sys/ufs/ffs/ffs_alloc.c:1248
#6  0xc0786b82 in ffs_valloc (pvp=0xc3ad9440, mode=33152, cred=0xc3afbc80,
vpp=0xd896d8d4) at /usr/src/sys/ufs/ffs/ffs_alloc.c:932
#7  0xc07ae73f in ufs_makeinode (mode=33152, dvp=0xc3ad9440, vpp=0xd896dbe0,
cnp=0xd896dbf4) at /usr/src/sys/ufs/ufs/ufs_vnops.c:2181
#8  0xc07ab89d in ufs_create (ap=0x0) at 
/usr/src/sys/ufs/ufs/ufs_vnops.c:171

#9  0xc0851f18 in VOP_CREATE_APV (vop=0x0, a=0xd896da64) at vnode_if.c:204
#10 0xc06b0364 in vn_open_cred (ndp=0xd896dbcc, flagp=0xd896dccc, cmode=384,
cred=0xc3afbc80, fdidx=5) at vnode_if.h:111
#11 0xc06b01a2 in vn_open (ndp=0x0, flagp=0xd896dccc, cmode=384, fdidx=5)
at /usr/src/sys/kern/vfs_vnops.c:91
#12 0xc06a8be6 in kern_open (td=0xc38b4c00, path=0x0, pathseg=UIO_USERSPACE,
flags=2562, mode=439) at /usr/src/sys/kern/vfs_syscalls.c:1002
---Type  to continue, or q  to quit---
#13 0xc06a8afa in open (td=0xc38b4c00, uap=0xd896dd04)
at /usr/src/sys/kern/vfs_syscalls.c:968
#14 0xc084176b in syscall (frame=
  {tf_fs = 59, tf_es = 59, tf_ds = 59, tf_edi = 439, tf_esi = 
134615073, tf_ebp = -1077941720, tf_isp = -661201564, tf_ebx = 4, tf_edx 
= -1, tf_ecx = 

Re: A handy utility (at least for me)

2006-08-29 Thread Naram Qashat
- Original Message - 
From: "Bill Vermillion" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, August 29, 2006 12:24 PM
Subject: Re: A handy utility (at least for me)


> On Tue, Aug 29, 2006 at 12:00 [EMAIL PROTECTED]
> saw "Error reading FAT table? Try SKINNY table?" And promptly
> said:
>
> > Date: Mon, 28 Aug 2006 18:18:58 +0200 (CEST)
> > From: Oliver Fromme <[EMAIL PROTECTED]>
> > Subject: Re: A handy utility (at least for me)
>
> > Rick C. Petty wrote:
>
> >  > Mario Lobo wrote:
>
> >  > > My /usr/ports directory was occuping 24 gigs, of which 20
> >  > > was just from the 'work' directories !
>
> > You should type "make clean" more often.  ;-)
>
> And to ensure that 'make clean' in the /usr/ports directory runs
> much faster, be sure to add   NOCLEANDEPENDS=YES in your
> /etc/make.conf.
>
> After you run that on the entire tree besure to comment it out so
> that when you run   make clean   inside a port you clean all the
> dependancies too.

You could always just do make NOCLEANDEPENDS=yes clean from /usr/ports and
then you wouldn't need to worry about setting it in your /etc/make.conf.

>
> Bill
>
> -- 
> Bill Vermillion - bv @ wjv . com
>
Naram Qashat
___
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: A handy utility (at least for me)

2006-08-29 Thread Thiago Damas

It can be:
cd /usr/ports
rm -rf */*/work

[]s


On 8/26/06, Rick C. Petty <[EMAIL PROTECTED]> wrote:

On Sat, Aug 26, 2006 at 07:19:06PM -0300, Mario Lobo wrote:
>
> My  /usr/ports directory was occuping 24 gigs, of which 20 was just from the
> 'work' directories !
>
> Removing them one by one was a pain so I wrote this little utility to wipe
> them off.

I find that the following command works just fine for me:

find /usr/ports -type d -name work -prune -print -delete

=)

-- Rick C. Petty
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"