jail + mount_union problem
We have a system with some jails. First jail's home directory is /data/jails/ref. Then, we are running script "crash" under root: --- #! /usr/local/bin/bash SRC="/data/jails/refDEST=/data/jails/$1 mkdir $DEST mkdir $DEST/usrmount_union -b $SRC/usr $DEST/usr mkdir $DEST/binmount_union -b $SRC/bin $DEST/bin mkdir $DEST/rootmount_union -b $SRC/root $DEST/root jail /data/jails/$1 jail$1 $2 /bin/csh /root/scripts/runjail mount_union -b $SRC/usr $DEST/usr mount_union -b $SRC/bin $DEST/bin mount_union -b $SRC/root $DEST/root -- Originally, this script was designed to make a clone of the first jail. Contents of /root/scripts/runjail: - sshd/usr/local/apache/bin/apachectl startcd /usr/local/mysqlbin/safe_mysqld --user=mysql &cron - After this, system hangs up. When trying to reboot with "boot -sv" we see: ... ... trying /sbin/init... and freebsd halts again. There is no way to boot up. Of course, fsck reports "no problem" and checksum of /sbin/init is correct. The only way to continue working is to run "upgrade" from the instalation CD. We are using freebsd 4.5. May be anybody knows solution for this problem? Victor Polyakov ([EMAIL PROTECTED])
Re: jail + mount_union problem
Hello, > We have a system with some jails. First jail's home directory is > /data/jails/ref. Then, we are running script "crash" under root: > May be anybody knows solution for this problem? Try NULLFS. It works for me. See my previous post on this. (NULLFS was in the subject) [ Free Software ISOs - ftp://ftp.fsn.hu/pub/CDROM-Images/ ]--- Attila Nagy e-mail: [EMAIL PROTECTED] Free Software Network (FSN.HU)phone @work: +361 210 1415 (194) cell.: +3630 306 6758 To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: unionfs and getcwd problem.
> > The only obvious `problem' is when a non-r00t user attempts to > > access the union-mounted fs when the shadow directories have not > > yet been created, and `permission denied' is returned for all > > directories that exist below, but not in the unionfs fs. E.g.: > Yes, it is because of feature of unionfs to create shadow directories > with credentionals of proceses doing "rise" operation. > > And if process have no permissions to write into parent directory > operation fail. I have thought about what is best to do in a case like this. At first, I was thinking that if a directory like this does not presently exist in the upper (unionfs) layer, then for the case of a read-only operation like `ls', simply fall through to display what is present in the lower layer. This, if it is possible (I have no idea; I'm no hacker), would avoid the ``hey, why can't I do a simple `ls'?!?'' type of question. Of course, there would be a problem when some actual writes need to be performed in the unionfs layer. For example, suppose the ownerships in a directory path are something like mountpoint/root/r00t/user/FILE and the user is then able to `ls' all the directories down to the one s/he owns, seeing the contents of the lower layer, but then, due to being unable to create the r00t-owned directories in the path that do not yet exist in the upper unionfs layer, any attempt to do `work' in the user-owned directory will fail. So you just get the same sort of questions, only later. ``I have permission, why do I get permission denied?!?'' I do not know if this is even possible in the case of a command or operation that needs not modify the contents of the unionfs later, because I do not know the details of the internals of what happens, so I could be completely wrong to suggest this. > Another solution is to change behaviour of unionfs to use root-cred > while make shadows, and then put attributes/ownership from lower layer > to shadows. > (but this will take a bit of kernel hacking) This is another thing that I have wondered if it could be done. As it is, one of the `quirks' about the shadow directories, is that they get created with the timestamps of the first access which required their creation, and not the timestamps of the underlying filesystem. This can be both a bug and a feature, because it can be used to see immediately when a union-mounted directory was created when looking at a filesystem, when this is useful. On the other hand, the actual attributes of the underlying directory may easily change while the unionfs-mounted shadow gets unchanged, and this change may not be visible to the user. I will be quiet now, because I don't know of what I speak. Anyway, I just did a few more things on a slightly-older -current, built 07.Mar (sorry, I've had no time...), with a unionfs mount atop a read-only nullfs mount, and I do in fact see a problem with files present in both the upper and lower layer, just as I saw the duplicate directories shown by `ls'. Also, certain commands that work on a file only present in the lower layer fail until the file in question has been touched into the unionfs layer, with -current (I don't remember if this was a -stable problem too). This may be well-known and already-solved because I am almost three weeks out of date; if so, sorry. Here are the notes I made about this: unionfs mounted dir atop nullfs dir [10:06:25][EMAIL PROTECTED]:/usr/src/sys/modules/splash/bmp{535}# ls -lart total 52 -rw-r--r-- 1 root wheel 17634 Mar 6 2001 splash_bmp.c -rw-r--r-- 1 root wheel 17634 Mar 6 2001 splash_bmp.c-DIST -rw-r--r-- 1 root wheel194 Jan 24 22:37 Makefile drwxr-xr-x 7 root wheel512 Mar 25 10:03 .. drwxr-xr-x 7 root wheel512 Mar 25 10:03 .. -rw-r--r-- 1 root wheel 4918 Mar 25 10:05 splash_bmp.c-patch drwxr-xr-x 4 root wheel512 Mar 25 10:05 . drwxr-xr-x 4 root wheel512 Mar 25 10:05 . contents of nullfs-remounted (original) dir: [10:08:19][EMAIL PROTECTED]:/usr/src/sys/modules/splash/bmp{543}# ls -lart /usr/local/system/src/sys/modules/splash/bmp/ total 24 -rw-r--r-- 1 root wheel 17634 Mar 6 2001 splash_bmp.c drwxr-xr-x 4 root wheel512 Nov 23 00:21 .. drwxr-xr-x 2 root wheel512 Jan 24 22:37 . -rw-r--r-- 1 root wheel194 Jan 24 22:37 Makefile Contents of unionfs atop that: [10:05:59][EMAIL PROTECTED]:/usr/local/source-hacks/sys/modules/splash/bmp{533}# ls -lart total 28 -rw-r--r-- 1 root wheel 17634 Mar 6 2001 splash_bmp.c-DIST drwxr-xr-x 3 root wheel512 Mar 25 10:03 .. -rw-r--r-- 1 root wheel 4918 Mar 25 10:05 splash_bmp.c-patch drwxr-xr-x 2 root wheel512 Mar 25 10:05 . Attempt to use patch: [10:07:00][EMAIL PROTECTED]:/usr/src/sys/modules/splash/bmp{539}# patch < splash_bmp.c-patch Hmm... Looks like a unified diff to me... The text leading up to this was: -- |--- /FreeBSD-4/usr/local/source-hacks/sys/modules/splash/bmp/splash_bmp.c-DIST Tue Oct 31 09:00:06
Re: D-Link device ste tx underrun
> From: "David O'Brien" <[EMAIL PROTECTED]> > On Sat, Mar 23, 2002 at 02:16:21PM -0800, Lucky Green wrote: >> Hi there, >> I just installed a new D-Link DFE-550TX NIC on my machine running >> FreeBSD 4.5-RELEASE-p2. I am seeing the following errors in the log >> file: >> >> Mar 23 15:01:05 pakastelohi /kernel: ste0: transmission error: 90 >> Mar 23 15:01:05 pakastelohi /kernel: ste0: tx underrun, increasing tx >> start threshold to 60 bytes >> Mar 23 18:40:17 pakastelohi /kernel: ste0: transmission error: 90 >> Mar 23 18:40:17 pakastelohi /kernel: ste0: tx underrun, increasing tx >> start threshold to 120 bytes >> >> A Google search showed that at least one other person has reported what >> looks like the same problem, but I have been unable to locate a cause or >> fix. Suggestions are appreciated. > > Why do you think this is a problem vs. just a diagnostic? > This not unusual. This really should be in the FAQ. > Let's see... it's a release OS and it's spewing cryptic and somewhat dire-looking messages with the word "error" in them. Why would someone think this is a problem? H IMO, if it's a release OS and it's an expected condition and there are no knobs that could or should be twiddled to change the situation, then messages containing the word "error" should not be spewed to the logs and console. Or the people who maintain the software that do the spewing should not adopt a condescending attitude when people ask what they should do to fix it. -- Ian To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
pcm unable to map IO port
Hello all, I'm trying to make my sound card work on a compaq 1700 laptop with FreeBSD 4.5-RELEASE. AFAIK and from advice from people in this list my sound card uses the maestro3 module. I add the following lines to my kernel configuration. device pcm0 at isa? irq 10 drq 1 flags 0x0 # for non-PnP sound cards device pcm # for PnP/PCI sound cards I was following the instruction of the driver in this page http://www.cs.duke.edu/~anderson/freebsd/maestro3xxx/ I know that the maestro3 module is already build in, but checking out the source files from the webpage and my computer that I see that I do not have the following /usr/src/sys/dev/sound/pci/maestro3_dsp.h the other files are maestro3.c maestro3_reg.h So i thought it will be better to make the module again. But before all this maestro thing I recompile my kernel with the pcm lines that I already gave you, and I got this error in the dmesg after recompiling the kernel and rebooting. pcm0: irq 5 at device 31.5 on pci0 pcm0: unable to map IO port space device_probe_and_attach: pcm0 attach returned 6 I'm kind of lost right now. What could be the problem. In windoze, my sound card appear as a SoundMax Integrated Digital Audio with the following Interrupt Request 05 Input/Output Range 1400 - 14FF Input/Output Range 1080 - 10BF I'm only subscribe to the freebsd-questions list. I'll apreciate you help thanks Gerardo Amaya _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Missing PT_READ_U
> }> As the culprit behind PT_READ_U's demise, I'm willing to dive in > }> and help here if needed. > }Thanks but Julian sent me a patch for 4.5 that seems to work > }with no changes in ups. Would be nice if PT_READ_U is put > }back in 4.x. > > As a followup to this old thread (and as the poster of the original > question on the ups mailing list in late Feb) I note there has still > been no change on the RELENG_4 branch to fix this. Could we have the > patch posted here at least so other people can use ups again (with > signals)? I'd just apply a reverse patch from kern/sys_process.c 1.51.2.2 > to 1.51.2.1 except that I don't know if other files (apart from sys/ptrace.h) > have been affected. Julain Elischer's diff as applied to the 4.5-RELEASE included below. With this change ups-3.37-beta4 compiled unchanged. But note that you still can't change any registers. If PT_WRITE_U is added back to the FreeBSD-4.x branch, no change is necessary to ups. So how about it, Peter Wemm? The other alternative is to change ups to understand PT_{SET,GET}{REGS,FPREGS} -- this would be needed for FreeBSD-5 in any case. But this is not a quick change as ups uses PTRACE_{PEEK,POKE}USER for dealing with registers and signals and these need to be replaced something more discriminating. I took a quick look at it but then got distracted. Also, not every arch. has separate FP regs and I didn't look deep enough in ups to figure out how to add machine dependent code like this. -- bakul Index: sys/ptrace.h === RCS file: /home/ncvs/src/sys/sys/ptrace.h,v retrieving revision 1.10.2.1 diff -u -r1.10.2.1 ptrace.h --- sys/ptrace.h3 Oct 2001 06:55:43 - 1.10.2.1 +++ sys/ptrace.h1 Mar 2002 21:52:57 - @@ -40,7 +40,7 @@ #definePT_TRACE_ME 0 /* child declares it's being traced */ #definePT_READ_I 1 /* read word in child's I space */ #definePT_READ_D 2 /* read word in child's D space */ -/* was PT_READ_U 3* read word in child's user structure */ +#definePT_READ_U 3 /* read word in child's user structure */ #definePT_WRITE_I 4 /* write word in child's I space */ #definePT_WRITE_D 5 /* write word in child's D space */ /* was PT_WRITE_U 6* write word in child's user structure */ Index: kern/sys_process.c === RCS file: /home/ncvs/src/sys/kern/sys_process.c,v retrieving revision 1.51.2.3 diff -u -r1.51.2.3 sys_process.c --- kern/sys_process.c 22 Jan 2002 17:22:59 - 1.51.2.3 +++ kern/sys_process.c 1 Mar 2002 23:45:18 - @@ -257,6 +257,7 @@ case PT_READ_I: case PT_READ_D: + case PT_READ_U: case PT_WRITE_I: case PT_WRITE_D: case PT_CONTINUE: @@ -413,6 +417,33 @@ } return (error); + case PT_READ_U: + if ((uintptr_t)uap->addr > UPAGES * PAGE_SIZE - +sizeof(int)) { + return EFAULT; + } + if ((uintptr_t)uap->addr & (sizeof(int) - 1)) { + return EFAULT; + } + if (ptrace_read_u_check(p,(vm_offset_t) uap->addr, + sizeof(int))) { + return EFAULT; + } + error = 0; + PHOLD(p); /* user had damn well better be incore!*/ + if (p->p_flag & P_INMEM) { + p->p_addr->u_kproc.kp_proc = *p; + fill_eproc (p, &p->p_addr->u_kproc.kp_eproc); + curp->p_retval[0] = *(int *) + ((uintptr_t)p->p_addr + + (uintptr_t)uap->addr); + } else { + curp->p_retval[0] = 0; + error = EFAULT; + } + PRELE(p); + return error; + case PT_KILL: uap->data = SIGKILL; goto sendsig; /* in PT_CONTINUE above */ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Thanks, and Distributed Folding Client for FreeBSD available!!
--- Rayson Ho <[EMAIL PROTECTED]> wrote: > Hi, > > Thanks to the people on this list, the DistributedFolding client is > available on FreeBSD. People with spare CPU cycles can install this > (P2P seti@home like software) to help the world to fight/cure all kinds > of diseases!! > > http://www.distributedfolding.org/Download.html > > Again, thanks for the great help. > > Rayson Runs with nice +20 though. __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Open bug reports with no action?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Content-Type: text/plain; charset=us-ascii In message <[EMAIL PROTECTED]>, Matthew Dillon wri tes: >:I submitted a bug report (PR# bin/31933) in November that's never been looked >:at. I even enclosed a patch that fixes the bug. Is there anything that I can >:do to get the bug looked at sooner rather than later? > >Sure. Hmm. I'm not sure I like the idea of using -- instead of -n. >It led to some confusion when I was reading the patch. The user should never use '--'. The code just assigns the initial username or uid to the '--' argument so that it is associated with an argument. I wanted an argument that wouldn't be accidentially tried by the user thus causing inconsistencies if they used both the '--' argument and a leading username or uid on the command line. Also, using the '--' allowed me to preserve almost all of the current code and make the change simpler. Would it help if there were some additional clarifying comments in the code? >What if we officially assigned an actual option letter like 'U' instead >of '-'? Another alternative would be to have a global ExactUser global >that defaults to 0 and gets set to 1 if either -n or -u are explicitly >specified. Those would work, but we might have problems we people using both an initial username/uid and a -U argument in the first solution. See the following sample command line: "pw userdel 10012 -U bob". What do you do in this situation if there's a user named "10012" and no user with uid 10012? Which user do you delete? What about if there is a user with uid 10012 but it's not bob? The current code is pretty clean WRT problems like this, and I wanted to make the patch as simple as possible. - -- Ted Cabeen http://www.pobox.com/~secabeen[EMAIL PROTECTED] Check Website or Keyserver for PGP/GPG Key BA0349D2 [EMAIL PROTECTED] "I have taken all knowledge to be my province." -F. Bacon [EMAIL PROTECTED] "Human kind cannot bear very much reality."-T.S.Eliot[EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (OpenBSD) Comment: Exmh version 2.5 07/13/2001 iD8DBQE8n4ZWoayJfLoDSdIRAj6jAKCRrJfsvIL+j8DlpLk/hPG7bBLjPQCbB8+z PGYs3qEayp8B3OGcqhswoyM= =3xuo -END PGP SIGNATURE- To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Thanks, and Distributed Folding Client for FreeBSD available!!
On Mon, 25 Mar 2002, Yo Yu wrote: > > Runs with nice +20 though. Of course.. don't want it to interfere with real work To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Thanks, and Distributed Folding Client for FreeBSD available!!
The client already has an option to control the priority: Distributed Foldtraj v2002.03.21 arguments: -f Input Trajectory Distribution File (NO EXTENSION) [File In] -n Native structure filename (NO EXTENSION) [File In] -q Quiet? [T/F] Optional default = FALSE -d Use small buffer? [T/F] Optional default = TRUE -p Priority (-20=aggressive, 20=passive) [Integer] Optional default = 20 range from -20 to 20 -g progress.txt update frequency (0=disable) [Integer] Optional default = 5 range from 0 to 100 -i Connect to internet? [T/F] Optional default = TRUE -u Upload and exit? [T/F] Optional default = FALSE Rayson --- Julian Elischer <[EMAIL PROTECTED]> wrote: > On Mon, 25 Mar 2002, Yo Yu wrote: > > > > Runs with nice +20 though. > Of course.. > don't want it to interfere with real work __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Missing PT_READ_U
[EMAIL PROTECTED] writes: }Julian Elischer's diff as applied to the 4.5-RELEASE included }below. With this change ups-3.37-beta4 compiled unchanged. } }But note that you still can't change any registers. If }PT_WRITE_U is added back to the FreeBSD-4.x branch, no change }is necessary to ups. So how about it, Peter Wemm? I'm actually getting crashes in ups (on 4.5, compiled on 4.4) whenever the debugged program receives a signal. I assume putting back PT_READ_U will be sufficient to fix this? }The other alternative is to change ups to understand }PT_{SET,GET}{REGS,FPREGS} -- this would be needed for }FreeBSD-5 in any case. But this is not a quick change as ups }uses PTRACE_{PEEK,POKE}USER for dealing with registers and }signals and these need to be replaced something more }discriminating. I took a quick look at it but then got }distracted. Also, not every arch. has separate FP regs and I }didn't look deep enough in ups to figure out how to add }machine dependent code like this. Hopefully some enterprising young programmer in the ups camp will be able to help out (when an alternate interface exists - is it in -current now?). Unfortunately, I don't have knowledge to hack inside ups to that degree. C Callum Gibson [EMAIL PROTECTED] Global Markets IT, Deutsche Bank, Australia 61 2 9258 1620 ### The opinions in this message are mine and not Deutsche's ### To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Thanks, and Distributed Folding Client for FreeBSD available!!
Rayson Ho wrote: > > The client already has an option to control the priority: [ ... ] > -p Priority (-20=aggressive, 20=passive) [Integer] Optional > default = 20 > range from -20 to 20 You may also want to consider "idleprio". -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: idprio
>> >> The client already has an option to control the priority: > [ ... ] >> -p Priority (-20=aggressive, 20=passive) [Integer] Optional >> default = 20 >> range from -20 to 20 > > You may also want to consider "idleprio". > Speaking of idprio... I liked the good old days (3.x) when you didn't have to be root to use the command. Given that idprio can be used to raise priorities as well as lower them, I can see the point of having some restrictions, but shouldn't it be possible to structure the code such that a non-root user can lower but not raise the priority on a process they own? I'll even volunteer to do the work unless there's some good reason (technical or policy-wise) why it can't be done. -- Ian To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Open bug reports with no action?
: :The user should never use '--'. The code just assigns the initial username or :uid to the '--' argument so that it is associated with an argument. I wanted :an argument that wouldn't be accidentially tried by the user thus causing :inconsistencies if they used both the '--' argument and a leading username or :uid on the command line. Also, using the '--' allowed me to preserve almost :all of the current code and make the change simpler. Would it help if there :were some additional clarifying comments in the code? Well, I'm thinking more in regards to this hack only working once. i.e. if we had to do something similar to another parameter of pw we'd be stuck. :>What if we officially assigned an actual option letter like 'U' instead :>of '-'? Another alternative would be to have a global ExactUser global :>that defaults to 0 and gets set to 1 if either -n or -u are explicitly :>specified. : :Those would work, but we might have problems we people using both an initial :username/uid and a -U argument in the first solution. See the following :sample command line: :"pw userdel 10012 -U bob". :What do you do in this situation if there's a user named "10012" and no user :with uid 10012? Which user do you delete? What about if there is a user :with uid 10012 but it's not bob? The current code is pretty clean WRT :problems like this, and I wanted to make the patch as simple as possible. : :- -- :Ted Cabeen http://www.pobox.com/~secabeen[EMAIL PROTECTED] I think there may be some confusion. I simply meant assigning an official option that represents the default state of affairs, not actually require that you USE the option. i.e. you could still use pw the way you've always used it for the fuzzy case. -Matt To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Help with getting load information
Hi all, Is there a set of APIs that I can use to get the system information like the memory size, swap size, # of CPUs? Also, I want to get the information about the load, and also process information. thanks for your help in advance, -Ron __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Help with getting load information
On Mon, Mar 25, 2002 at 05:16:26PM -0800, Ron Chen wrote: > Hi all, > > Is there a set of APIs that I can use to get the > system information like the memory size, swap size, # > of CPUs? For some globus GRIS scripts, I'm using the sysctls vm.stats.vm.v_page_size and vm.stats.vm.v_page_count to get memory size. I'm calculating free memory (a bogus concept in FreeBSD) as total-active-inactive-wired, all of which are available under vm.stats.vm. Swap information is available from the swapinfo command. If you really need it in an API you could just steal the code. The number of cpus is easy as it's just the hw.ncpu sysctl. Other information is currently difficult to obtain and I'm currently parsing the output of the cpuid port to obtain a fair bit of it. The only source of Mhz is /var/run/dmesg.boot. > Also, I want to get the information about the load, > and also process information. Load is available from the sysctl vm.loadavg. -- Brooks -- Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 msg33076/pgp0.pgp Description: PGP signature
Re: Help with getting load information
Does "top" use those calls?? Rayson --- Brooks Davis <[EMAIL PROTECTED]> wrote: > On Mon, Mar 25, 2002 at 05:16:26PM -0800, Ron Chen wrote: > > Hi all, > > > > Is there a set of APIs that I can use to get the > > system information like the memory size, swap size, # > > of CPUs? > > For some globus GRIS scripts, I'm using the sysctls > vm.stats.vm.v_page_size and vm.stats.vm.v_page_count to get memory > size. > I'm calculating free memory (a bogus concept in FreeBSD) as > total-active-inactive-wired, all of which are available under > vm.stats.vm. Swap information is available from the swapinfo > command. > If you really need it in an API you could just steal the code. > > The number of cpus is easy as it's just the hw.ncpu sysctl. Other > information is currently difficult to obtain and I'm currently > parsing > the output of the cpuid port to obtain a fair bit of it. The only > source of Mhz is /var/run/dmesg.boot. > > > Also, I want to get the information about the load, > > and also process information. > > Load is available from the sysctl vm.loadavg. > > -- Brooks > > -- > Any statement of the form "X is the one, true Y" is FALSE. > PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 > > ATTACHMENT part 2 application/pgp-signature __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Help with getting load information
Rayson Ho [[EMAIL PROTECTED]] wrote : > Does "top" use those calls?? No. > Rayson > > --- Brooks Davis <[EMAIL PROTECTED]> wrote: > > On Mon, Mar 25, 2002 at 05:16:26PM -0800, Ron Chen wrote: > > > Hi all, > > > > > > Is there a set of APIs that I can use to get the > > > system information like the memory size, swap size, # > > > of CPUs? > > > > For some globus GRIS scripts, I'm using the sysctls > > vm.stats.vm.v_page_size and vm.stats.vm.v_page_count to get memory > > size. > > I'm calculating free memory (a bogus concept in FreeBSD) as > > total-active-inactive-wired, all of which are available under > > vm.stats.vm. Swap information is available from the swapinfo > > command. > > If you really need it in an API you could just steal the code. > > > > The number of cpus is easy as it's just the hw.ncpu sysctl. Other > > information is currently difficult to obtain and I'm currently > > parsing > > the output of the cpuid port to obtain a fair bit of it. The only > > source of Mhz is /var/run/dmesg.boot. > > > > > Also, I want to get the information about the load, > > > and also process information. > > > > Load is available from the sysctl vm.loadavg. > > > > -- Brooks > > > > -- > > Any statement of the form "X is the one, true Y" is FALSE. > > PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 > > > > > ATTACHMENT part 2 application/pgp-signature > > > > __ > Do You Yahoo!? > Yahoo! Movies - coverage of the 74th Academy Awards® > http://movies.yahoo.com/ > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-hackers" in the body of the message -- Jonathan Mini [EMAIL PROTECTED] Yersterday, I was ashamed of myself. Today, I am just hungry. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
freebsd newmidi and microtimeout patches; is microtimeout neededanymore with 4.5-RELEASE and newer
Hello; i am trying to pick up where http://www.r.dl.itc.u-tokyo.ac.jp/~tanimura/freebsd-serialmidi/ leaves off. can anyone tell me if the microtimeout patch is still required? i ask this because i understand that freebsd has made progress in terms of realtime behavior, so wouldnt it be possible to leverage those improvements? any suggestions would be greatly appreciated. tnx! johnu -- John L. Utz III [EMAIL PROTECTED] Idiocy is the Impulse Function in the Convolution of Life To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: jail + mount_union problem
Unfortunately, NULLFS filesystem does not permit users to modify files. We want do give each user a copy of /usr and to permit installation of software etc... Victor Polyakov ([EMAIL PROTECTED]) > Hello, > > > We have a system with some jails. First jail's home directory is > > /data/jails/ref. Then, we are running script "crash" under root: > > May be anybody knows solution for this problem? > Try NULLFS. It works for me. > See my previous post on this. (NULLFS was in the subject) > > [ Free Software ISOs - ftp://ftp.fsn.hu/pub/CDROM-Images/ ]--- > Attila Nagy e-mail: [EMAIL PROTECTED] > Free Software Network (FSN.HU) phone @work: +361 210 1415 (194) > cell.: +3630 306 6758 > > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
UDP jail bug patch (was Re: (PATCH) Re: jail bug with ircd-hybridin_pcbconnect()?)
I previously posted a patch to fix this UDP-in-jail bug which I believe may have compromised the security of the jail. This patch shouldn't do that. It: 1. preserves the jail check in in_pcbconnect() 2. preserves the laddr+lport check in the beginning of in_pcbbind() 3. modifies no code outside of the jail path 4. only diddles with the PCB laddr which shouldn't have any side effects because that is exactly what udp_output() is doing to cause the problem in the first place Arguably the real fix should be to fix the hash table and the bogosity in udp_output(), but I don't have the time to commit to that. --- in_pcb.c.oldMon Mar 18 23:57:57 2002 +++ in_pcb.cTue Mar 19 09:52:45 2002 @@ -501,6 +501,8 @@ int error; if (inp->inp_laddr.s_addr == INADDR_ANY && p->p_prison != NULL) { + if (inp->inp_lport != 0) + inp->inp_laddr.s_addr = htonl(p->p_prison->pr_ip); bzero(&sa, sizeof (sa)); sa.sin_addr.s_addr = htonl(p->p_prison->pr_ip); sa.sin_len=sizeof (sa); To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message