Re: jails and output of df/mount [PATCH]
Hi Jürgen, On Wed, May 18, 2005 at 12:45:29AM +0200, Juergen Unger wrote: On Tue, May 17, 2005 at 11:43:24PM +0200, Jeremie Le Hen wrote: [...] There seems to be one small bug in your patch : once applied, we don't see informations about / any longer inside jails. please try the new one at http://www.addict.de/unger/fbsd/patch-20050518/ tested this one, compiles and seems to work as expected: On jailhost (outside): $ uname -a FreeBSD pinserv6.p-i-n.com 5.4-STABLE FreeBSD 5.4-STABLE #10: Mon May 23 10:07:39 CEST 2005 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/PE2650 i386 [EMAIL PROTECTED]:~$ mount /dev/aacd0s2a on / (ufs, local) devfs on /dev (devfs, local) /dev/aacd1s1d on /data (ufs, local, soft-updates) /dev/aacd0s2e on /usr (ufs, local, soft-updates) /dev/aacd0s2d on /var (ufs, local, soft-updates) procfs on /proc (procfs, local) devfs on /data/jails/test01/dev (devfs, local) devfs on /data/jails/test02/dev (devfs, local) In jails: [EMAIL PROTECTED] mount /dev/aacd1s1d on /data (ufs, local, soft-updates) devfs on /data/jails/test01/dev (devfs, local) [EMAIL PROTECTED] mount /dev/aacd1s1d on /data (ufs, local, soft-updates) devfs on /data/jails/test02/dev (devfs, local) Mfg Raphael Becker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
(no subject)
Hi, How can I get the process_id of a process when I've the process_name from within a C program? Also can the command kill (pid, SIGCONT) be used to restart a dead daemon process where pid is the process_id of the daemon from within a C program? -- Gowtham ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: (no subject)
How can I get the process_id of a process when I've the process_name from within a C program? Also can the command You could look at the way its done in src/usr.bin/killall/killall.c, or read the manual page for kvm_getprocs(3). kill (pid, SIGCONT) be used to restart a dead daemon process SIGCONT can only resume existing processes that are stopped. -- FreeBSD Volunteer, http://people.freebsd.org/~jkoshy ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Behaviour of mount_unionfs
cupa:/mnt/freesbie# ll total 4 drwxr-xr-x 2 root wheel 512 23 Mag 05:13 unionvar drwxr-xr-x 2 root wheel 512 23 Mag 05:13 var cupa:/mnt/freesbie# mdconfig -a -t vnode -f /usr/local/freesbieiso/uzip/var.uzip md2 cupa:/mnt/freesbie# mount /dev/md2.uzips1a var cupa:/mnt/freesbie# ls -l var/ total 40 drwxrwxr-x 2 rootoperator 512 23 Mag 04:54 .snap drwxr-xr-x 2 rootwheel 512 23 Mag 04:33 account drwxr-xr-x 4 rootwheel 512 23 Mag 04:33 at drwxr-x--- 2 rootwheel 512 23 Mag 04:33 backups drwxr-x--- 2 rootwheel 512 23 Mag 04:33 crash drwxr-x--- 3 rootwheel 512 23 Mag 04:33 cron drwxr-xr-x 6 rootwheel 512 23 Mag 04:33 db dr-xr-xr-x 2 rootwheel 512 23 Mag 04:33 empty drwxrwxr-x 2 rootgames 512 23 Mag 04:33 games drwx-- 2 rootwheel 512 23 Mag 04:33 heimdal drwxr-xr-x 2 rootwheel 512 23 Mag 04:33 log drwxrwxr-x 2 rootmail 512 23 Mag 04:33 mail drwxr-xr-x 2 daemon wheel 512 23 Mag 04:33 msgs drwxr-xr-x 5 rootwheel 512 23 Mag 04:33 named drwxr-xr-x 2 rootwheel 512 23 Mag 04:33 preserve drwxr-xr-x 4 rootwheel 512 23 Mag 04:48 run drwxrwxr-x 2 rootdaemon512 23 Mag 04:33 rwho drwxr-xr-x 8 rootwheel 512 23 Mag 04:33 spool drwxrwxrwt 3 rootwheel 512 23 Mag 04:48 tmp drwxr-xr-x 2 rootwheel 512 23 Mag 04:35 yp cupa:/mnt/freesbie# mdconfig -a -t malloc -o compress -s 16m md3 cupa:/mnt/freesbie# /sbin/newfs -U /dev/md3 /dev/md3: 16.0MB (32768 sectors) block size 16384, fragment size 2048 using 4 cylinder groups of 4.02MB, 257 blks, 576 inodes. with soft updates super-block backups (for fsck -b #) at: 160, 8384, 16608, 24832 cupa:/mnt/freesbie# mount /dev/md3 unionvar/ cupa:/mnt/freesbie# mount_unionfs unionvar/ var/ cupa:/mnt/freesbie# ls -l var/ total 40 drwxrwxr-x 4 root operator 512 23 Mag 05:14 .snap drwxr-xr-x 4 root wheel 512 23 Mag 05:15 account drwxr-xr-x 6 root wheel 512 23 Mag 05:15 at drwxr-xr-x 4 root wheel 512 23 Mag 05:15 backups drwxr-xr-x 4 root wheel 512 23 Mag 05:15 crash drwxr-xr-x 5 root wheel 512 23 Mag 05:15 cron drwxr-xr-x 8 root wheel 512 23 Mag 05:15 db drwxr-xr-x 4 root wheel 512 23 Mag 05:15 empty drwxr-xr-x 4 root wheel 512 23 Mag 05:15 games drwxr-xr-x 4 root wheel 512 23 Mag 05:15 heimdal drwxr-xr-x 4 root wheel 512 23 Mag 05:15 log drwxr-xr-x 4 root wheel 512 23 Mag 05:15 mail drwxr-xr-x 4 root wheel 512 23 Mag 05:15 msgs drwxr-xr-x 7 root wheel 512 23 Mag 05:15 named drwxr-xr-x 4 root wheel 512 23 Mag 05:15 preserve drwxr-xr-x 6 root wheel 512 23 Mag 05:15 run drwxr-xr-x 4 root wheel 512 23 Mag 05:15 rwho drwxr-xr-x 10 root wheel 512 23 Mag 05:15 spool drwxr-xr-x 5 root wheel 512 23 Mag 05:15 tmp drwxr-xr-x 4 root wheel 512 23 Mag 05:15 yp cupa:/mnt/freesbie# With unionfs we lost (again) every kind of permission. From the man page I cannot realize if this really is the expected behaviour. Bye, Dario -- Dario Freni ([EMAIL PROTECTED]) - satu on Azzurra FreeSBIE developer (http://www.freesbie.org) GPG Public key at http://www.saturnero.net/saturnero.asc pgpYLaYvzHBq7.pgp Description: PGP signature
Re: snapshots and innds
Excellent detective work on your part. The invarient that is being broken here is that you are never supposed to hold a vnode locked when you call vn_start_write. The call to vn_start_write should be done in vm_object_sync before acquiring the vnode lock rather than later in vnode_pager_putpages. Of course, moving the vn_start_write out of vnode_pager_putpages means that we have to track down every other caller of vnode_pager_putpages to make sure that they have also done the vn_start_write call as well. Jeff Robertson has come up with a much cleaner way of dealing with the suspension code that I believe he is using in the -current tree. It puts a hook in the ufs_lock code that tracks the number of locks held in each filesystem. To do a suspend, it blocks all new lock requests on that filesystem by any thread that does not already hold a lock and waits for all the existing locks to be released. This obviates the need for the vn_start_write calls sprinkled all through the system. I have copied Jeff on this email so that he can comment further on this issue as he is much more up to speed on it at the moment than I am. Kirk McKusick =-=-=-=-=-=-= From: [EMAIL PROTECTED] (Steve Watt) Date: Sun, 22 May 2005 14:02:39 -0700 In-Reply-To: [EMAIL PROTECTED] (Steve Watt) snapshots and innds (Dec 18, 17:39) To: freebsd-hackers@freebsd.org Subject: Re: snapshots and innds Cc: [EMAIL PROTECTED] X-Archived: [EMAIL PROTECTED] X-ASK-Info: Whitelist match [from [EMAIL PROTECTED] (2005/05/22 14:03:00) [ OK, there's a lot of text in here, but I have definitively found a deadlock between ffs_mksnap and msync(). ] Waaay back on Dec 18, 17:39, I wrote: } Subject: snapshots and innds } I'm getting a strong hunch that snapshots and inn don't get along } well, presumably having something to do with inn's extensive use } of mmap(). } } Just for an example, my system panic()ed earlier today (different } problem) and during the reboot, I'm stuck with an fsck_ufs on wchan } ufs and innd on wchan suspfs, and neither of them responding } in any way. And I have been seeing hangs periodically since December that all seem to implicate innd(msync()) arguing with dump(mksnap_ffs). The system is 5.4-STABLE, updated last on the (PDT) morning of 2 May. Finally, this morning, I got a kernel core dump that I can do useful stuff with. The system was mostly operating normally, except that any attempt to access the /news partition (which has articles, tradspool.map, overviews, and incoming/outgoing data) would get stuck in suspfs. So I forced a dump from ddb. The mount point does (as one would expect) have MNTK_SUSPEND set. I see mksnap_ffs sitting waiting for ufs (really vnode 0xc19af318), which it got to via: (kgdb) info stack #0 sched_switch (td=0xc1ede780, newtd=0xc146f480, flags=1) at /usr/src/sys/kern/sched_4bsd.c:882 #1 0xc0662ad0 in mi_switch (flags=1, newtd=0x0) at /usr/src/sys/kern/kern_synch.c:355 #2 0xc067a9e4 in sleepq_switch (wchan=0x0) at /usr/src/sys/kern/subr_sleepqueue.c:406 #3 0xc067ab9e in sleepq_wait (wchan=0x0) at /usr/src/sys/kern/subr_sleepqueue.c:518 #4 0xc06627b6 in msleep (ident=0xc19af3c4, mtx=0xc095e4cc, priority=80, wmesg=0xc08a3f13 ufs, timo=0) at /usr/src/sys/kern/kern_synch.c:228 #5 0xc06505d6 in acquire (lkpp=0xd02df680, extflags=16777280, wanted=1536) at /usr/src/sys/kern/kern_lock.c:161 #6 0xc0650a14 in lockmgr (lkp=0xc19af3c4, flags=16842754, interlkp=0x0, td=0xc1ede780) at /usr/src/sys/kern/kern_lock.c:389 #7 0xc07bd6e3 in ufs_lock (ap=0xd02df6bc) at /usr/src/sys/ufs/ufs/ufs_vnops.c:2007 #8 0xc07be380 in ufs_vnoperate (ap=0x0) at /usr/src/sys/ufs/ufs/ufs_vnops.c:2828 #9 0xc06c0501 in vn_lock (vp=0xc19af318, flags=65538, td=0xc1ede780) at vnode_if.h:1013 #10 0xc06b4195 in vget (vp=0xc19af318, flags=65538, td=0x0) at /usr/src/sys/kern/vfs_subr.c:2028 #11 0xc07af408 in ffs_sync (mp=0xc15e5c00, waitfor=1, cred=0xc2953080, td=0xc1ede780) at /usr/src/sys/ufs/ffs/ffs_vfsops.c:1151 #12 0xc06c0840 in vfs_write_suspend (mp=0xc15e5c00) at /usr/src/sys/kern/vfs_vnops.c:1084 #13 0xc079db18 in ffs_snapshot (mp=0xc15e5c00, snapfile=0xbfbfef1b Address 0xbfbfef1b out of bounds) at /usr/src/sys/ufs/ffs/ffs_snapshot.c:317 #14 0xc07ad5d8 in ffs_omount (mp=0xc15e5c00, path=0xc2a8c380 /news, data=0x0, td=0xc1ede780) at /usr/src/sys/ufs/ffs/ffs_vfsops.c:313 #15 0xc06af787 in vfs_domount (td=0xc1ede780, fstype=0xc1eea730 ffs, fspath=0xc2a8c380 /news, fsflags=18944000, fsdata=0xbfbfe7d4, compat=1) at /usr/src/sys/kern/vfs_mount.c:861 #16 0xc06aef16 in mount (td=0x0, uap=0xd02dfd04) at /usr/src/sys/kern/vfs_mount.c:620 #17 0xc0828553 in syscall (frame= [ snip ] And inn is sitting waiting for the suspended filesystem: (kgdb) info stack #0 sched_switch (td=0xc1c16c00, newtd=0xc1ede780, flags=1) at /usr/src/sys/kern/sched_4bsd.c:882 #1 0xc0662ad0 in mi_switch (flags=1, newtd=0x0) at /usr/src/sys/kern/kern_synch.c:355 #2 0xc067a9e4
Re: Behaviour of mount_unionfs
On Mon, May 23, 2005 at 08:34:59AM +0200, Davide D'Amico wrote: cupa:/mnt/freesbie# mount /dev/md3 unionvar/ cupa:/mnt/freesbie# mount_unionfs unionvar/ var/ what if mount_unionfs var/ unionvar/ ? It works correctly. Patching system ASAP. -- Dario Freni ([EMAIL PROTECTED]) - satu on Azzurra FreeSBIE developer (http://www.freesbie.org) GPG Public key at http://www.saturnero.net/saturnero.asc pgpxORoUSvD2x.pgp Description: PGP signature
Tyan S2460 and btx.S
Apparently FreeBSD 5.x is neither able to power off nor reset a Tyan Tiger MP (S2460) motherboard. I believe it's a known problem. While the power off may be due to a broken ACPI the reset can be fixed. Revision 1.33 log of /sys/boot/i386/btx/btx/btx.S says: date: 2003/11/16 18:24:23; author: phk; state: Exp; lines: +1 -1 When rebooting the machine jump to 0xf000:0xfff0 instead of 0x:0x0. While we end up the same place, we end up with two different CS register values after the jump and 0xf000 is compatible with the hardware reset value. This makes a difference if the BIOS does a near jump before a far jump. Detective work and patch by: Adrian Steinmann [EMAIL PROTECTED] I tried reverting the patch and now the Tyan motherboard seems to reset as expected. My knowledge of the PC architecture intricacies is not good enough to discuss the merits of revision 1.33 patch, but I believe it could be worth having an ifdef-ed code in btx.S to accommodate motherboards like this one. -- walter pelissero http://www.pelissero.de ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: [PATCH] sbin/route should attempt to resolve hostnames for INET6
Hi, On Sat, 21 May 2005 00:39:51 +0200 Andreas Kohn [EMAIL PROTECTED] said: andreas attached is a small patch to /sbin/route.c 1.78 so that route's behavior andreas matches the description from the manpage: andreas All symbolic names specified for a destination or gateway are andreas looked up first as a host name using gethostbyname(3). If this andreas lookup fails, getnetbyname(3) is then used to interpret the name as andreas that of a network. I've committed it. andreas - removes SOCK_DGRAM requirement, which was marked as dummy. andreas getaddrinfo(3) says 0 should be given if one does not care No, we should care it in usual. Unless this, two entries are returned; one is for SOCK_DGRAM and the other is for SOCK_STREAM. I feel that `dummy' means route(8) doesn't use ai_socktype later. Sincerely, -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan [EMAIL PROTECTED] [EMAIL PROTECTED],jp.}FreeBSD.org http://www.imasy.org/~ume/ ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Porting on FreeBSD 53
On Mon, 23 May 2005, Greg 'groggy' Lehey wrote: [severely trimmed] [severely trimmed again :)] Now that I've had time to look at it, both problems appear to be related to signals, but that's about as far as it goes. I wouldn't expect any connection unless it's a general signal race condition. Oops. We went off list for awhile. The first problem I reported had been fixed within CVS since the day (of course) after I had updated my source tree. See (kern/80130 [1]). It fixed Hervé's problem but not my GDB problem. I started a new thread in hackers[2] for the two bugs (sigsuspend() and nanosleep()) I found including sample code. Hopefully, the sample code points to my actual problem. Seán 1. http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/80130 2. http://lists.freebsd.org/pipermail/freebsd-hackers/2005-May/012005.html -- [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: watching a file for ownership change
On Sat, May 21, 2005 at 10:38:30PM -0400, Charles Sprickman wrote: I'd like to find a way to watch one of the user's maildirsize files that seems to flip ownerships at least once a day and try to determine what process is changing the ownership. How can I do that without dropping a bunch of daemons on a production machine into heavy-debug mode? OS is 4.8 with all current patches. You could try watching kevent() on the file for EVFILT_VNODE with NOTE_ATTRIB. You'd need to write a small C program to do this. Whilst this won't tell you who did what, it could give you sufficiently good timestamps from it happening to begin tracking the culprit down further, perhaps using lsof. BMS ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Error installing FreeBSd 5.3 AMD 64 bit-Highpoint 1820A
Hi all, I am instalaling FreeBSD 5.3 AMD 64 bit with 6- 200GB drives. Using Higpoint 1820A controller and doing RAID 10. I am using drivers for the card from Highpoint Web. The problem is when I make the partitions and the machine tries to format the partitions it says: unable to find device node for /dev/da0s1b under /dev! and then it comes out. Any ideas what is going on. Also tried making two slices no luck. Thanks in advance. A ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: watching a file for ownership change
On Sun, 22 May 2005 04:05:50 +0100 Bruce M Simpson [EMAIL PROTECTED] wrote: On Sat, May 21, 2005 at 10:38:30PM -0400, Charles Sprickman wrote: I'd like to find a way to watch one of the user's maildirsize files that seems to flip ownerships at least once a day and try to determine what process is changing the ownership. How can I do that without dropping a bunch of daemons on a production machine into heavy-debug mode? OS is 4.8 with all current patches. You could try watching kevent() on the file for EVFILT_VNODE with NOTE_ATTRIB. You'd need to write a small C program to do this. Whilst this won't tell you who did what, it could give you sufficiently good timestamps from it happening to begin tracking the culprit down further, perhaps using lsof. When I saw the first post I actually wrote the kevent program you are sugesting as an exercise, then I realized that I couldn't obtain the PID of the process that modified the file. Would it be feasible/reasonable to add this feature to kqueue ? marco ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Error installing FreeBSd 5.3 AMD 64 bit-Highpoint 1820A
Hi guys, Anyone??? Amandeep wrote: Hi all, I am instalaling FreeBSD 5.3 AMD 64 bit with 6- 200GB drives. Using Higpoint 1820A controller and doing RAID 10. I am using drivers for the card from Highpoint Web. The problem is when I make the partitions and the machine tries to format the partitions it says: unable to find device node for /dev/da0s1b under /dev! and then it comes out. Any ideas what is going on. Also tried making two slices no luck. Thanks in advance. A ___ 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: Error installing FreeBSd 5.3 AMD 64 bit-Highpoint 1820A
Hi guys, Anyone??? Amandeep wrote: Hi all, I am instalaling FreeBSD 5.3 AMD 64 bit with 6- 200GB drives. Using Higpoint 1820A controller and doing RAID 10. I am using drivers for the card from Highpoint Web. The problem is when I make the partitions and the machine tries to format the partitions it says: unable to find device node for /dev/da0s1b under /dev! and then it comes out. Any ideas what is going on. Also tried making two slices no luck. Thanks in advance. A ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions 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: Error installing FreeBSd 5.3 AMD 64 bit-Highpoint 1820A
Sounds like u have followed the install guide with the drivers. I couldn't get that to work ( without ACPI ) I had to install with ACPI but this was 5.4-RELEASE but using the 5.3 driver from highpoints site as there wasn't a 5.4 driver available. 1. Boot from cd 2. got to boot prompt, load the driver from floppy 3. unplug the floppy ( must to this as floppy under amd64 is broken ) 4. boot the kernel and install. Notes: 1. I was using a RAID 5 array 5 disks * 400Gb. 2. Create the array using 16 k stripe or the performance will be poor. - Original Message - From: Amandeep [EMAIL PROTECTED] I am instalaling FreeBSD 5.3 AMD 64 bit with 6- 200GB drives. Using Higpoint 1820A controller and doing RAID 10. I am using drivers for the card from Highpoint Web. The problem is when I make the partitions and the machine tries to format the partitions it says: unable to find device node for /dev/da0s1b under /dev! and then it comes out. Any ideas what is going on. Also tried making two slices no luck. This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137 or return the E.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: Error installing FreeBSd 5.3 AMD 64 bit-Highpoint 1820A
Sounds like u have followed the install guide with the drivers. I couldn't get that to work ( without ACPI ) I had to install with ACPI but this was 5.4-RELEASE but using the 5.3 driver from highpoints site as there wasn't a 5.4 driver available. 1. Boot from cd 2. got to boot prompt, load the driver from floppy 3. unplug the floppy ( must to this as floppy under amd64 is broken ) 4. boot the kernel and install. Notes: 1. I was using a RAID 5 array 5 disks * 400Gb. 2. Create the array using 16 k stripe or the performance will be poor. - Original Message - From: Amandeep [EMAIL PROTECTED] I am instalaling FreeBSD 5.3 AMD 64 bit with 6- 200GB drives. Using Higpoint 1820A controller and doing RAID 10. I am using drivers for the card from Highpoint Web. The problem is when I make the partitions and the machine tries to format the partitions it says: unable to find device node for /dev/da0s1b under /dev! and then it comes out. Any ideas what is going on. Also tried making two slices no luck. This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137 or return the E.mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions 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]
Forcing static-linking on a port?
I need to make use of a port during start up, but it has library dependencies that aren't available, before the complete library path is established. I've tried the following: NO_SHARED=true (added to /etc/make.conf) make -DNO_SHARED make LDFLAGS+=-static Every time, running file on the compiled program tells me that the binary is dynamically-linked. I couldn't find anything else in any man pages, Mk files, mailing lists, Google, etc. Sorry for the semi-inappropriate list choice, but this one would get swallowed up on -questions. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: watching a file for ownership change
It seems like you'd want your kevent() callback (or whatever) to be triggered as the modifying process is exiting the syscall that is modifying the file but before control is actually passed back to it - you'd want to be able to 'catch it in the act' so to speak. On 5/23/05 1:23 PM, Marco Molteni [EMAIL PROTECTED] wrote: On Sun, 22 May 2005 04:05:50 +0100 Bruce M Simpson [EMAIL PROTECTED] wrote: On Sat, May 21, 2005 at 10:38:30PM -0400, Charles Sprickman wrote: I'd like to find a way to watch one of the user's maildirsize files that seems to flip ownerships at least once a day and try to determine what process is changing the ownership. How can I do that without dropping a bunch of daemons on a production machine into heavy-debug mode? OS is 4.8 with all current patches. You could try watching kevent() on the file for EVFILT_VNODE with NOTE_ATTRIB. You'd need to write a small C program to do this. Whilst this won't tell you who did what, it could give you sufficiently good timestamps from it happening to begin tracking the culprit down further, perhaps using lsof. When I saw the first post I actually wrote the kevent program you are sugesting as an exercise, then I realized that I couldn't obtain the PID of the process that modified the file. Would it be feasible/reasonable to add this feature to kqueue ? marco ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED] -- Joe McGuckin ViaNet Communications 994 San Antonio Road Palo Alto, CA 94303 Phone: 650-213-1302 Cell: 650-207-0372 Fax: 650-969-2124 ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Forcing static-linking on a port?
In the last episode (May 23), Darren Pilgrim said: I need to make use of a port during start up, but it has library dependencies that aren't available, before the complete library path is established. I've tried the following: NO_SHARED=true (added to /etc/make.conf) make -DNO_SHARED make LDFLAGS+=-static Every time, running file on the compiled program tells me that the binary is dynamically-linked. I couldn't find anything else in any man pages, Mk files, mailing lists, Google, etc. Sorry for the semi-inappropriate list choice, but this one would get swallowed up on -questions. NO_SHARED only works on programs that use the bsd.prog.mk makefile template; I'd guess under a dozen ports do this. Some pieces of software have dynamic-link options hardcoded in their Makefiles, probably as a workaround for bugs in other OSes. Those options override -static. I can't think of a valid reason for them to be used in FreeBSD. Search for (and remove) any occurances of -Wl,-Bdynamic and -Wl,-Bstatic , and you should be set. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]