Re: bridging
yes, with any two interfaces the bridge works well. tcpdump show these messages when i configure bridge with more than 2 interfaces: 14:52:57.771505 ARP, Request who-has 192.168.4.157 tell 192.168.4.155, length 46 14:52:57.771519 ARP, Reply 192.168.4.157 is-at 00:0b:ab:4f:d4:2a (oui Unknown), length 46 14:52:58.788076 ARP, Request who-has 192.168.4.157 tell 192.168.4.155, length 46 14:52:58.788095 ARP, Reply 192.168.4.157 is-at 00:0b:ab:4f:d4:2a (oui Unknown), length 46 14:52:59.804630 ARP, Request who-has 192.168.4.157 tell 192.168.4.155, length 46 14:52:59.804646 ARP, Reply 192.168.4.157 is-at 00:0b:ab:4f:d4:2a (oui Unknown), length 46 14:53:00.821083 ARP, Request who-has 192.168.4.157 tell 192.168.4.155, length 46 14:53:00.821098 ARP, Reply 192.168.4.157 is-at 00:0b:ab:4f:d4:2a (oui Unknown), length 46 14:53:01.837654 ARP, Request who-has 192.168.4.157 tell 192.168.4.155, length 46 14:53:01.837672 ARP, Reply 192.168.4.157 is-at 00:0b:ab:4f:d4:2a (oui Unknown), length 46 it seems that bridging just can be done by two interfaces:( i use ifconfig bridge0 create and ifconfig addm igb1 addm igb2 for bridging two interfaces. i test by putting the below commands in rc.conf file: cloned_interfaces=bridge0 ifconfig_bridge0=addm igb1 addm igb2 addm gbeth1 up but nothing changed. On Mon, Dec 12, 2011 at 10:40 AM, Da Rock freebsd-questi...@herveybayaustralia.com.au wrote: On 12/12/11 15:49, saeedeh motlagh wrote: my freebsd is 8.2 and i have four interfaces which two of them are gbeth and two others are igb. i think the interfaces are ok beacuse when i bridge two interfaces, it works fine. i use the below command to create my bridge: ifconfig bridge0 create ifconfig bridge0 addm gbeth0 addm igb0 addm igb1 addm gbeth1 up what is wrong here? it's so necessary for me to doing this:( Is it any 2 interfaces? What command do you use to get the 2 interfaces working? On Sun, Dec 11, 2011 at 5:16 PM, Da Rock freebsd-questions@**herveybayaustralia.com.aufreebsd-questi...@herveybayaustralia.com.au wrote: On 12/11/11 23:31, saeedeh motlagh wrote: hello everybody i have a problem in bridging my interfaces. i want to bridge my 4 interfaces and make switching in freebsd box but in doesn't work. with two interfaces the bridge works well and pass the traffic but for four interfaces in doesn't what is expected. you know i want to have a freebsd sysytem to do switching between four systems which are connected to. somebody know what's wrong? and how i can bridge my four interfaces and have switching? thanks motlagh Can you supply information on what devices you are using for your switches? Ifconfig, pciconf -lv Which version are you using? uname -a What commands are you using to setup switching? What diagnostics have you done? How do you know it doesn't work? Good luck. I'm sure someone can help if you provide that information, although they may need more. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questionshttp://lists.freebsd.org/**mailman/listinfo/freebsd-**questions http://lists.**freebsd.org/mailman/listinfo/**freebsd-questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-** unsubscr...@freebsd.orgfreebs**d-questions-unsubscribe@**freebsd.orgfreebsd-questions-unsubscr...@freebsd.org __**_ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-** unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org __**_ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-** unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re[2]: How to boot new kernel
On Mon, 12 Dec 2011, Коньков Евгений wrote: | | HI, krad. | | How I can figure out the correspondence of bios drive number and | freebsd numbering? | | | | Have a look at boot.config file you should be able to do something | there | | On Dec 11, 2011 8:57 PM, Kon'kov Evgenij [1]kes-...@yandex.ru | wrote: | | Hi Freebsd-questions. | | In system two disks now: | | # kenv | grep dev | | currdev=disk1s1a: | | loaddev=disk1s1a: | | loader_conf_files=/boot/device.hints /boot/loader.conf | /boot/loader.conf.local | | vfs.root.mountfrom=ufs:/dev/ad8s1a | | kern.devalias.ada0=ad4 | | kern.devalias.ada1=ad8 | | one was with installed FreeBSD (ad4) and second is empty (ad8) | | I install new system to ad8 and add to (ad4) /boot/loader.conf next | line: | | vfs.root.mountfrom=ufs:/dev/ad8s1a | | so next time I booted from second hdd. | | But now I have problem. | | How to boot kernel from second device instead of first one. | | BIOS starts to run loader from first device (ad4) and kernel is booted | | from it but all other is mounted from (ad8) | | # df -h | | Filesystem SizeUsed Avail Capacity Mounted on | | /dev/ad8s1a 1G117M809M13%/ | | devfs 1.0k1.0k 0B 100%/dev | | /dev/ad8s1e 1G267M660M29%/tmp | | /dev/ad8s1f 39G 23G 13G64%/usr | | /dev/ad8s1d5.8G3.9G1.5G72%/var | | procfs 4.0k4.0k 0B 100%/proc | | devfs 1.0k1.0k 0B 100%/var/named/dev | | so in memory I have old kenel | | uname -a shows that #0: Sat Nov 12 20:17:02 EET 2011 | | (I have compiled new kenel on 2011 12 03 ) | | but on disk all is new: kernel and world. | | How to force to load kernel from second drive (without access to | | machine directly)? | You can specify an alternative slice on the next boot: boot0cfg -s XXX adYYY where XXX - slice number, YYY - disk number +---+ ! CANMOS ISP Network! +---+ ! Best regards ! ! Igor V. Ruzanov, network operational staff! ! e-Mail: ig...@canmos.ru ! +---+___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: bridging
i solve it:) the stp should be running on all interfaces On Mon, Dec 12, 2011 at 11:43 AM, saeedeh motlagh saeedeh.motl...@gmail.com wrote: yes, with any two interfaces the bridge works well. tcpdump show these messages when i configure bridge with more than 2 interfaces: 14:52:57.771505 ARP, Request who-has 192.168.4.157 tell 192.168.4.155, length 46 14:52:57.771519 ARP, Reply 192.168.4.157 is-at 00:0b:ab:4f:d4:2a (oui Unknown), length 46 14:52:58.788076 ARP, Request who-has 192.168.4.157 tell 192.168.4.155, length 46 14:52:58.788095 ARP, Reply 192.168.4.157 is-at 00:0b:ab:4f:d4:2a (oui Unknown), length 46 14:52:59.804630 ARP, Request who-has 192.168.4.157 tell 192.168.4.155, length 46 14:52:59.804646 ARP, Reply 192.168.4.157 is-at 00:0b:ab:4f:d4:2a (oui Unknown), length 46 14:53:00.821083 ARP, Request who-has 192.168.4.157 tell 192.168.4.155, length 46 14:53:00.821098 ARP, Reply 192.168.4.157 is-at 00:0b:ab:4f:d4:2a (oui Unknown), length 46 14:53:01.837654 ARP, Request who-has 192.168.4.157 tell 192.168.4.155, length 46 14:53:01.837672 ARP, Reply 192.168.4.157 is-at 00:0b:ab:4f:d4:2a (oui Unknown), length 46 it seems that bridging just can be done by two interfaces:( i use ifconfig bridge0 create and ifconfig addm igb1 addm igb2 for bridging two interfaces. i test by putting the below commands in rc.conf file: cloned_interfaces=bridge0 ifconfig_bridge0=addm igb1 addm igb2 addm gbeth1 up but nothing changed. On Mon, Dec 12, 2011 at 10:40 AM, Da Rock freebsd-questi...@herveybayaustralia.com.au wrote: On 12/12/11 15:49, saeedeh motlagh wrote: my freebsd is 8.2 and i have four interfaces which two of them are gbeth and two others are igb. i think the interfaces are ok beacuse when i bridge two interfaces, it works fine. i use the below command to create my bridge: ifconfig bridge0 create ifconfig bridge0 addm gbeth0 addm igb0 addm igb1 addm gbeth1 up what is wrong here? it's so necessary for me to doing this:( Is it any 2 interfaces? What command do you use to get the 2 interfaces working? On Sun, Dec 11, 2011 at 5:16 PM, Da Rock freebsd-questions@**herveybayaustralia.com.aufreebsd-questi...@herveybayaustralia.com.au wrote: On 12/11/11 23:31, saeedeh motlagh wrote: hello everybody i have a problem in bridging my interfaces. i want to bridge my 4 interfaces and make switching in freebsd box but in doesn't work. with two interfaces the bridge works well and pass the traffic but for four interfaces in doesn't what is expected. you know i want to have a freebsd sysytem to do switching between four systems which are connected to. somebody know what's wrong? and how i can bridge my four interfaces and have switching? thanks motlagh Can you supply information on what devices you are using for your switches? Ifconfig, pciconf -lv Which version are you using? uname -a What commands are you using to setup switching? What diagnostics have you done? How do you know it doesn't work? Good luck. I'm sure someone can help if you provide that information, although they may need more. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questionshttp://lists.freebsd.org/**mailman/listinfo/freebsd-**questions http://lists.**freebsd.org/mailman/listinfo/**freebsd-questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-** unsubscr...@freebsd.orgfreebs**d-questions-unsubscribe@**freebsd.orgfreebsd-questions-unsubscr...@freebsd.org __**_ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-** unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org __**_ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-** unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: PAM configuration to allow passwords from both Unix and Kerberos
10.12.2011 04:22, Matt Mullins wrote: For my systems, the canonical source of authentication information is a Kerberos server, but I also want to support old-fashioned Unix passwords for a handful of users (including myself) just in case the Kerberos system is unreachable. I'm having a bit of trouble adjusting to the semantics of FreeBSD's PAM configuration, it seems. The following is what I have tried in /etc/pam.d/sshd: auth optional pam_deny.so auth sufficient pam_unix.so no_warn try_first_pass auth sufficient pam_krb5.so no_warn try_first_pass Why you just haven't changed the last line to `required`? This does what I want: tries Unix authentication, and for most users, then goes and tries Kerberos authentication. However, it also seems to allow access if the module does something other than success or failure: I hit ^D at the SSH password prompt and it grants me access! Adding debug to these lines doesn't seem to get anything additional logged, so I'm actually not sure why PAM ends up with a success code somewhere. I flipped this logic around and did: auth sufficient pam_unix.so no_warn auth sufficient pam_krb5.so no_warn try_first_pass auth required pam_deny.so That's not what you want. Read pam_deny(8). It has no use for real world scenarios except when something goes weird. This does exactly what I want for services like sudo, that just use pam_authenticate(), but since sufficient is equivalent to optional in pam_setcred(), sshd fails all authentications with: Dec 9 15:05:18 boron-shell sshd[66617]: fatal: PAM: pam_setcred(): failed to retrieve user credentials I am completely stumped how to get this behavior working for both pam_authenticate and pam_setcred calls. Can someone enlighten me what a more normal way to do this would be? Why just don't get stock `/usr/src/etc/pam.d/sshd` and uncomment anything related to kerberos? That's quite simple unlike managing `su`. -- Sphinx of black quartz judge my vow. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Certain users can't start python
2011/12/12 Michael Ross g...@ross.cx: Hello, I am ... stuck. I've been trying to setup mercurials web frontend with apache, but apache won't start python. Not as cgi-script, not with mod_python. Investigating, I found this not only to be a problem with apache. Situation now: Users michael and root can run python. All others can't: Could not find platform independent libraries prefix Could not find platform dependent libraries exec_prefix Consider setting $PYTHONHOME to prefix[:exec_prefix] ImportError: No module named site For troubleshooting, I cloned michael to an new user dummy, i. e. I created the user, copied all .dotfiles from michael over, adjusted permissions. dummy can't start python either. How did dou clone the account ? Does account has a full correct home path in /etc/passwd ? Changing accounts with su does not help: dummy$ su -l michael dummy$ su -m michael *both* can run python, michael$ su -l dummy michael$ su -m dummy *both* can not run python. Setting PYTHONHOME does not help -- the libraries are found (probably, the error messages disappear), the ImportError remains. It's been a couple of long days and maybe I'm missing something obvious? Any input would be greatly appreciated. 8.2 stable, python 2.7.2. As for python, I tried reinstalling. No change. TIA Michael ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org cheers, -- Demelier David ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Certain users can't start python
Am 12.12.2011, 11:26 Uhr, schrieb David Demelier demelier.da...@gmail.com: 2011/12/12 Michael Ross g...@ross.cx: Hello, I am ... stuck. I've been trying to setup mercurials web frontend with apache, but apache won't start python. Not as cgi-script, not with mod_python. Investigating, I found this not only to be a problem with apache. Situation now: Users michael and root can run python. All others can't: Could not find platform independent libraries prefix Could not find platform dependent libraries exec_prefix Consider setting $PYTHONHOME to prefix[:exec_prefix] ImportError: No module named site For troubleshooting, I cloned michael to an new user dummy, i. e. I created the user, copied all .dotfiles from michael over, adjusted permissions. dummy can't start python either. How did dou clone the account ? Does account has a full correct home path in /etc/passwd ? Created with adduser, copied .cshrc .profile the lot over. Yes, it has a correct home dir. I can ssh into it from another machine without trouble. Changing accounts with su does not help: dummy$ su -l michael dummy$ su -m michael *both* can run python, michael$ su -l dummy michael$ su -m dummy *both* can not run python. Setting PYTHONHOME does not help -- the libraries are found (probably, the error messages disappear), the ImportError remains. It's been a couple of long days and maybe I'm missing something obvious? Any input would be greatly appreciated. 8.2 stable, python 2.7.2. As for python, I tried reinstalling. No change. TIA Michael ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org cheers, ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Certain users can't start python
On Monday 12 of December 2011 06:31:46 Michael Ross wrote: Hello, I am ... stuck. I've been trying to setup mercurials web frontend with apache, but apache won't start python. Not as cgi-script, not with mod_python. Investigating, I found this not only to be a problem with apache. Situation now: Users michael and root can run python. All others can't: Could not find platform independent libraries prefix Could not find platform dependent libraries exec_prefix Consider setting $PYTHONHOME to prefix[:exec_prefix] ImportError: No module named site For troubleshooting, I cloned michael to an new user dummy, i. e. I created the user, copied all .dotfiles from michael over, adjusted permissions. dummy can't start python either. Is user 'dummy' in same groups that 'michael' is ? I think it can be something with permissions, maybe files in /local/lib/python2.7/ got strange permissions ? Basically module 'site' (site.py in detail) is loaded by interpreter on early start, so if it can't read it , python will raise this error. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Certain users can't start python
Am 12.12.2011, 13:22 Uhr, schrieb Tomasz Kowalczyk kowalczf...@gmail.com: On Monday 12 of December 2011 06:31:46 Michael Ross wrote: Hello, I am ... stuck. I've been trying to setup mercurials web frontend with apache, but apache won't start python. Not as cgi-script, not with mod_python. Investigating, I found this not only to be a problem with apache. Situation now: Users michael and root can run python. All others can't: Could not find platform independent libraries prefix Could not find platform dependent libraries exec_prefix Consider setting $PYTHONHOME to prefix[:exec_prefix] ImportError: No module named site For troubleshooting, I cloned michael to an new user dummy, i. e. I created the user, copied all .dotfiles from michael over, adjusted permissions. dummy can't start python either. Is user 'dummy' in same groups that 'michael' is ? No, it wasn't. I forgot to add it to the wheel group. (Missing something obvious alright). I think it can be something with permissions, maybe files in /local/lib/python2.7/ got strange permissions ? That was it: /usr/local/lib/python2.7 was chmodded 770. No idea why. Thanks! Basically module 'site' (site.py in detail) is loaded by interpreter on early start, so if it can't read it , python will raise this error. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: ath0 + wlan0 + spa + Apple Airport Extreme = No Joy
On 11/12/2011 19:31, Christopher Hilton wrote: Good day, I'm trying to get FreeBSD going on a soekris box with an atheros based D-Link PCI wifi card. I intend to use this combination to bridge a difficult network back to ethernet but right now I'm just trying to get the soekris associated to the network. The network is managed by an Apple Airport Extreme. Note that this combination connects just fine to my MiFi 4082. I only have a problem connecting to the Airport. The soekris box is running FreeBSD 8.2-STABLE built from source about 11/15/2011. I have this in my /etc/wpa_supplicant.conf: network={ ssid=Vindaloo psk= } network={ ssid=Vindaloo-Mobile psk=** } If I read the wireless setup document right I need this in my /etc/rc.conf: wlans_ath0=wlan0 ifconfig_wlan0=ssid Vindaloo WPA DHCP This box appears to associate with the network just fine but then it doesn't receive anything except broadcast traffic. If you then manually run dhclient wlan0 once its booted and associated do you get a DHCP address? Vince Chris Hilton e: chris /at/ vindaloo /dot/ com All I was doing was trying to get home from work! -- Rosa Parks ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: 9.0 install and journaling
On Sun, 11 Dec 2011 15:42:52 +1000 Da Rock wrote: On 12/11/11 10:23, RW wrote: On Sun, 11 Dec 2011 08:17:41 +1000 Da Rock wrote: SUJ speeds up the check a lot, seconds as opposed to minutes. If something happens to the journal, it falls back to a standard fsck. But fsck needs to be run manually- I have users that can't do that, and the filesystem corrupts. Ergo gjournal; it boots up and fixes on the fly. So SU+J needs a manual fsck before booting proper or can it just boot and be done? It's not very different; gjournal and SU both attempt to leave the filesystem in an coherent state, but both still need a preen to recover lost space. In either case the preen can fail requiring a full fsck. Journalled SU make SU behave more like gjournal in that you can do a fast foreground check which avoids the lengthy background fsck and avoids deferring the handling of unexpected inconsistencies to the next boot. Yes, but I don't do a fsck to recover gjournal- it has a miniscule blurp for a nanosecond and prints a message at boot and thats it. If the filesystem is mounted via fstab the fsck is normally done automatically. You may not have noticed this because if nothing needs doing fsck_ufs can mark a gjournal filesystem clean instantaneously. There are two other possibilities. The first is that it may spend some time recovering orphaned files; this is much faster that a full fsck but it's still seconds or minutes. The second is that the journal sync may have failed in which case fsck terminates with UNEXPECTED INCONSISTENCY which requires a full fsck. This is similar to SU. In either case you only need a full fsck when things haven't worked out in line with the theory. Is it the same with su+j? If it does then I'll drop gjournal (and the performance hit) and I'll use su+j when I jump to 9.0. The SU equivalent of the journal sync is done before the crash happens. With SU you can have an instantaneous foreground fsck by deferring the recovery of lost files until the background check that runs after bootup. Journalling SU eliminates the few minutes of sluggish disk IO that that can cause. I've been disappointed by gjournal, the performance hit isn't as bad as background fsck but it is substantial and permanent, rather than a few minutes hare and there. I was hoping that gjournal would be more robust, but I've seen the occassional UNEXPECTED INCONSISTENCY just like I have with SU. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: PAM configuration to allow passwords from both Unix and Kerberos
On Mon, Dec 12, 2011 at 1:40 AM, Volodymyr Kostyrko c.kw...@gmail.com wrote: 10.12.2011 04:22, Matt Mullins wrote: auth optional pam_deny.so auth sufficient pam_unix.so no_warn try_first_pass auth sufficient pam_krb5.so no_warn try_first_pass Why you just haven't changed the last line to `required`? I did try that, but I omitted it due to completely failing behavior. pam_krb5.so returns failure during pam_setcred() if the user did not log in with Kerberos credentials, whereas pam_unix.so succeeds as long as the uid exists (I'm using nss_ldap for that part, so all the uids do indeed exist). Thus, pam_unix.so will work with required, but pam_krb5.so won't. Why just don't get stock `/usr/src/etc/pam.d/sshd` and uncomment anything related to kerberos? That's quite simple unlike managing `su`. That's pretty much what I did. I'm a little unhappy since pam_krb5.so is before pam_unix.so in the list, so if the KDC goes down I have to wait for a time-out to log in to my system... but that's always better than letting anyone in :) Thanks for your help, Matt Mullins ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: 9.0 install and journaling
As for one big / partition- linux may be using it: and its their biggest failing! I've had a system lockup due to lack of space. Never a problem with bsd as logs will only fill up var, a user won't break it with filling up usr, etc. And root always stays protected! Its saved my life a number of times... I can quickly fill TB's of data in no time, and if something goes bang the logs can be a silent killer too. My 2c's anyway... ___ And along those lines for security of the system, this is the U.S. DoD recommendations (well mandates really) including ZFS. Not that the DoD doesnt have security problems... but Im not big fan of the one or two mount point solution either never understood why other OS packagers think is okay to just dump it all under / Per the DISA STIG (Security Technical Implementation Guide) / (obviously) /home directories) /var /tmp /location of audit files should all be separate mount points The use of separate file systems for different paths can protect the system from failures resulting from a file system becoming full or failing... in addition... All local file systems must employ journaling or another mechanism that ensures file system consistency. Removable media, remote file systems, and any file system that does not contain approved device files must be mounted with the nodev option. Removable media, remote file systems, and any file system that does not contain approved setuid files must be mounted with the nosuid option. The nosuid option must be enabled on all NFS client mounts. and so on... you can find a copy of the UNIX STIG online and some of it is just crazy paranoia and makes your life a pain, but there are a lot of good practices in it too. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Installing free bsd
Im new to FreeBSD and did a FTP of 8.2 and unzipped to a cd rom. It was an ISO Version. I then FTP the CDROM BOOT file and un zipped it. Unfortunately It wont auto start when i put disk in computer startup. Need support.. Is the windows format on disk causing problems? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Installing free bsd
On Mon, Dec 12, 2011 at 02:36:04PM -0600, Daniel Lewis wrote: Im new to FreeBSD and did a FTP of 8.2 and unzipped to a cd rom. It was an ISO Version. I then FTP the CDROM BOOT file and un zipped it. Unfortunately It wont auto start when i put disk in computer startup. Need support.. Is the windows format on disk causing problems? Well, the .iso files you get from the FreeBSD distribution are ISO image files that need to be burned directly to a disk. There is no other processing or formatting that may be done. I do not know what you mean by 'unzipped to a cd rom'. I have never done anything that sounded like that. You should just download the .iso file and burn in to a fresh cd and fixate it. Then boot it. jerry ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Installing free bsd
On Mon, Dec 12, 2011 at 4:00 PM, Jerry McAllister jerr...@msu.edu wrote: On Mon, Dec 12, 2011 at 02:36:04PM -0600, Daniel Lewis wrote: Im new to FreeBSD and did a FTP of 8.2 and unzipped to a cd rom. It was an ISO Version. I then FTP the CDROM BOOT file and un zipped it. Unfortunately It wont auto start when i put disk in computer startup. Need support.. Is the windows format on disk causing problems? Well, the .iso files you get from the FreeBSD distribution are ISO image files that need to be burned directly to a disk. There is no other processing or formatting that may be done. I do not know what you mean by 'unzipped to a cd rom'. I have never done anything that sounded like that. You should just download the .iso file and burn in to a fresh cd and fixate it. Then boot it. jerry Yeah, there is nothing to unzip. You need to simply burn the ISO image on a CD/DVD. Once it is burned you should look at the content of the CD/DVD and you should see the files that are part of the ISO image... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: PAM confusion
On Thu, Dec 8, 2011 at 10:45 AM, Michael W. Lucas mwlu...@blackhelicopters.org wrote: Hi, I'm attempting to hook security/pam_ssh_agent_auth into sudo, and have learned that PAM doesn't work the way I thought it did. I'm running FreeBSD-9/i386, with sudo 1.7.2.6. My goal is that sudo pass all auth requests back to the users' SSH agent. Sudo should never use passwords for authentication. If the user doesn't have an SSH agent, or if the SSH agent breaks somehow, the sudo request is denied. With my current config, sudo requests are accepted without a password even if the users' environment has no $SSH_AUTH_SOCK. I'm obviously doing something wrong. Here's my pam.d/sudo. I removed password settings and required the pam_ssh_agent_auth library. --- #auth include system auth required /usr/local/lib/pam_ssh_agent_auth.so file=~/.ssh/authorized\ _keys # account account include system # session # XXX: pam_lastlog (used in system) causes users to appear as though # they are no longer logged in in system logs. session required pam_permit.so # password #password include system --- Any suggestions what I'm doing wrong? Thanks, ==ml -- Michael W. Lucas http://www.MichaelWLucas.com/, http://blather.MichaelWLucas.com/ Latest book: Network Flow Analysis http://www.networkflowanalysis.com/ mwlu...@blackhelicopters.org, Twitter @mwlauthor Make sure your sudoers file has Defaults env_keep += SSH_AUTH_SOCK Also, make sure your matching rule for your user doesn't have NOPASSWD set. It seems that since you've already authenticated to the system, sudo still knows the user and/or group credentials without the pam module's help - all it does is authenticate the public and private keys. If you have NOPASSWD, sudo doesn't even think it needs to refer to the authentication mechanism because according to sudoers it needs no password for the user issuing the request. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
connection speed (Rails performance)
Hello, it is my second attempt to switch from Gentoo to FreeBSD because: - if you google for FreeBSD you get sexy images of girls in red wear (turn safe search off) - I am a bit tired to upgrade my hardened servers - zfs supposed to work better and faster However I'am stuck at the same issue where I gave up half year ago. After setting up Ruby on Rails 3 (with rvm), Apache22 and Postgres, I ran some apache benchmarks and figured out that while FreeBSD wins at slow pages, at faster pages FreeBSD (for me) is way slower than Gentoo. A dynamic page: Gentoo: # ab -n 1000 -c 12 http://randi7/ This is ApacheBench, Version 2.3 $Revision: 655654 $ Requests per second:169.88 [#/sec] (mean) FreeBSD: # ab -n 1000 -c 12 http://randi7/ This is ApacheBench, Version 2.3 $Revision: 655654 $ Requests per second:59.31 [#/sec] (mean) A static page: $ echo hello public/index.html Gentoo: # ab -n 1000 -c 12 http://randi7/ This is ApacheBench, Version 2.3 $Revision: 655654 $ Requests per second:25047.59 [#/sec] (mean) FreeBSD: # ab -n 1000 -c 12 http://randi7/ This is ApacheBench, Version 2.3 $Revision: 655654 $ Requests per second:6160.29 [#/sec] (mean) The faster the page is generated the bigger the difference is in requests per seconds. I experienced the very same results half year ago at my first attemp to migrate to FreeBSD. All tests were done with more or less current kernels (both systems). This is a totally fresh install on a different computer. Half year ago I tried all of apache, thin, mongrel, nginx and the outcome was same. I guess it might be something with the connection but I don't know what. Of course all tests were ran on localhosts. How could I improve this? Mage ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Installing free bsd
Pierre-Luc Drouin wrote: On Mon, Dec 12, 2011 at 4:00 PM, Jerry McAllisterjerr...@msu.edu wrote: On Mon, Dec 12, 2011 at 02:36:04PM -0600, Daniel Lewis wrote: Im new to FreeBSD and did a FTP of 8.2 and unzipped to a cd rom. It was an ISO Version. I then FTP the CDROM BOOT file and un zipped it. Unfortunately It wont auto start when i put disk in computer startup. Need support.. Is the windows format on disk causing problems? Well, the .iso files you get from the FreeBSD distribution are ISO image files that need to be burned directly to a disk. There is no other processing or formatting that may be done. I do not know what you mean by 'unzipped to a cd rom'. I have never done anything that sounded like that. You should just download the .iso file and burn in to a fresh cd and fixate it. Then boot it. jerry Yeah, there is nothing to unzip. You need to simply burn the ISO image on a CD/DVD. Once it is burned you should look at the content of the CD/DVD and you should see the files that are part of the ISO image... Hello, Daniel Lewis: If you come from Windows world, probably by unzipping to a cd rom you mean double-clicking the .iso file and burning to a cd the displayed content of the iso file. Please, don't do that. Just look for burn image in your cd burning program, navigate to your just downloaded .iso file and select it for burning. If you want to install 8.2 version, you only need to download and burn the file: FreeBSD-8.2-RELEASE-i386-disc1.iso and later, maybe you will need to burn (in the same way, better in different disks) the files: FreeBSD-8.2-RELEASE-i386-disc2.iso and FreeBSD-8.2-RELEASE-i386-disc3.iso Then (Backup all your data) insert the first cd (-disc1.iso), restart your PC and select booting from the cd drive. But first! Please read more detailed instructions, and *Warnings* in: http://www.freebsd.org/doc/handbook/install-pre.html Good luck, dermidio. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Installing free bsd
First of all, always include the list in a response to something from the list. Other people will be reading and may well know more than me or any other person who responds. eg, don't just send the follow-on question back to the one responding. Send it to the list. On Mon, Dec 12, 2011 at 04:26:06PM -0600, Daniel Lewis wrote: do direct ftp to disk? And what do you mean by fixate? No. You ftp the file down to the local machine and then use a CD burning utility to burn file to the CD. On FreeBSD there is one called 'burncd'. I am not familiar with the ones on a MS system, but there are several available. Maybe someone else will suggest one or there is probably some information in the handbook. Fixate is something that finishes writing a terminal record on the CD image or something like that. I don't really know in detail. I think some burner utilities do it automatically with no choice. The burncd utility needs to have you specify it. jerry On 12/12/11, Jerry McAllister jerr...@msu.edu wrote: On Mon, Dec 12, 2011 at 02:36:04PM -0600, Daniel Lewis wrote: Im new to FreeBSD and did a FTP of 8.2 and unzipped to a cd rom. It was an ISO Version. I then FTP the CDROM BOOT file and un zipped it. Unfortunately It wont auto start when i put disk in computer startup. Need support.. Is the windows format on disk causing problems? Well, the .iso files you get from the FreeBSD distribution are ISO image files that need to be burned directly to a disk. There is no other processing or formatting that may be done. I do not know what you mean by 'unzipped to a cd rom'. I have never done anything that sounded like that. You should just download the .iso file and burn in to a fresh cd and fixate it. Then boot it. jerry ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: 9.0 install and journaling
On 12/13/11 06:00, Eric S Pulley wrote: As for one big / partition- linux may be using it: and its their biggest failing! I've had a system lockup due to lack of space. Never a problem with bsd as logs will only fill up var, a user won't break it with filling up usr, etc. And root always stays protected! Its saved my life a number of times... I can quickly fill TB's of data in no time, and if something goes bang the logs can be a silent killer too. My 2c's anyway... ___ And along those lines for security of the system, this is the U.S. DoD recommendations (well mandates really) including ZFS. Not that the DoD doesn’t have security problems... but I’m not big fan of the one or two mount point solution either… never understood why other OS packagers think is okay to just dump it all under / Per the DISA STIG (Security Technical Implementation Guide) / (obviously) /home directories) /var /tmp /location of audit files should all be separate mount points The use of separate file systems for different paths can protect the system from failures resulting from a file system becoming full or failing... in addition... All local file systems must employ journaling or another mechanism that ensures file system consistency. Removable media, remote file systems, and any file system that does not contain approved device files must be mounted with the nodev option. Removable media, remote file systems, and any file system that does not contain approved setuid files must be mounted with the nosuid option. The nosuid option must be enabled on all NFS client mounts. and so on... you can find a copy of the UNIX STIG online and some of it is just crazy paranoia and makes your life a pain, but there are a lot of good practices in it too. I don't think any of it crazy paranoia. A PITA, maybe, but not paranoid. Do you have a link to the original of it? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Installing free bsd
On Mon, Dec 12, 2011 at 06:05:29PM -0500, Jerry McAllister wrote: First of all, always include the list in a response to something from the list. Other people will be reading and may well know more than me or any other person who responds. eg, don't just send the follow-on question back to the one responding. Send it to the list. On Mon, Dec 12, 2011 at 04:26:06PM -0600, Daniel Lewis wrote: do direct ftp to disk? And what do you mean by fixate? No. You ftp the file down to the local machine and then use a CD burning utility to burn file to the CD. On FreeBSD there is one called 'burncd'. I am not familiar with the ones on a MS system, but there are several available. Maybe someone else will suggest one or there is probably some information in the handbook. Fixate is something that finishes writing a terminal record on the CD image or something like that. I don't really know in detail. I think some burner utilities do it automatically with no choice. The burncd utility needs to have you specify it. jerry On 12/12/11, Jerry McAllister jerr...@msu.edu wrote: On Mon, Dec 12, 2011 at 02:36:04PM -0600, Daniel Lewis wrote: Im new to FreeBSD and did a FTP of 8.2 and unzipped to a cd rom. It was an ISO Version. I then FTP the CDROM BOOT file and un zipped it. Unfortunately It wont auto start when i put disk in computer startup. Need support.. Is the windows format on disk causing problems? Well, the .iso files you get from the FreeBSD distribution are ISO image files that need to be burned directly to a disk. There is no other processing or formatting that may be done. I do not know what you mean by 'unzipped to a cd rom'. I have never done anything that sounded like that. You should just download the .iso file and burn in to a fresh cd and fixate it. Then boot it. jerry I've used Nero in the past on a Windows system to burn an ISO. You can download it (probably timebombed) from http://www.tucows.com/ I think. Instructions on burning and fixating are here: http://iso.snoekonline.com/iso.htm Regards, -- Frank Contact info: http://www.shute.org.uk/misc/contact.html pgpbWsoagepsp.pgp Description: PGP signature
Re: 9.0 install and journaling
On 12/13/11 04:09, RW wrote: On Sun, 11 Dec 2011 15:42:52 +1000 Da Rock wrote: On 12/11/11 10:23, RW wrote: On Sun, 11 Dec 2011 08:17:41 +1000 Da Rock wrote: SUJ speeds up the check a lot, seconds as opposed to minutes. If something happens to the journal, it falls back to a standard fsck. But fsck needs to be run manually- I have users that can't do that, and the filesystem corrupts. Ergo gjournal; it boots up and fixes on the fly. So SU+J needs a manual fsck before booting proper or can it just boot and be done? It's not very different; gjournal and SU both attempt to leave the filesystem in an coherent state, but both still need a preen to recover lost space. In either case the preen can fail requiring a full fsck. Journalled SU make SU behave more like gjournal in that you can do a fast foreground check which avoids the lengthy background fsck and avoids deferring the handling of unexpected inconsistencies to the next boot. Yes, but I don't do a fsck to recover gjournal- it has a miniscule blurp for a nanosecond and prints a message at boot and thats it. If the filesystem is mounted via fstab the fsck is normally done automatically. You may not have noticed this because if nothing needs doing fsck_ufs can mark a gjournal filesystem clean instantaneously. There are two other possibilities. The first is that it may spend some time recovering orphaned files; this is much faster that a full fsck but it's still seconds or minutes. The second is that the journal sync may have failed in which case fsck terminates with UNEXPECTED INCONSISTENCY which requires a full fsck. This is similar to SU. In either case you only need a full fsck when things haven't worked out in line with the theory. Is it the same with su+j? If it does then I'll drop gjournal (and the performance hit) and I'll use su+j when I jump to 9.0. The SU equivalent of the journal sync is done before the crash happens. With SU you can have an instantaneous foreground fsck by deferring the recovery of lost files until the background check that runs after bootup. Journalling SU eliminates the few minutes of sluggish disk IO that that can cause. I've been disappointed by gjournal, the performance hit isn't as bad as background fsck but it is substantial and permanent, rather than a few minutes hare and there. I was hoping that gjournal would be more robust, but I've seen the occassional UNEXPECTED INCONSISTENCY just like I have with SU. This is going to sound odd, I know, but what does your fstab look like with gjournal? I've only done /var and /usr like this: /dev/ad4s1e.journal /usrufs rw,async2 2 The only message that comes up for me after a crash is consistent or clean. No wait, no fsck. The performance isn't exactly lightning though... :) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Installing free bsd
On 12/13/11 09:58, Frank Shute wrote: On Mon, Dec 12, 2011 at 06:05:29PM -0500, Jerry McAllister wrote: First of all, always include the list in a response to something from the list. Other people will be reading and may well know more than me or any other person who responds. eg, don't just send the follow-on question back to the one responding. Send it to the list. On Mon, Dec 12, 2011 at 04:26:06PM -0600, Daniel Lewis wrote: do direct ftp to disk? And what do you mean by fixate? No. You ftp the file down to the local machine and then use a CD burning utility to burn file to the CD. On FreeBSD there is one called 'burncd'. I am not familiar with the ones on a MS system, but there are several available. Maybe someone else will suggest one or there is probably some information in the handbook. Fixate is something that finishes writing a terminal record on the CD image or something like that. I don't really know in detail. I think some burner utilities do it automatically with no choice. The burncd utility needs to have you specify it. jerry On 12/12/11, Jerry McAllisterjerr...@msu.edu wrote: On Mon, Dec 12, 2011 at 02:36:04PM -0600, Daniel Lewis wrote: Im new to FreeBSD and did a FTP of 8.2 and unzipped to a cd rom. It was an ISO Version. I then FTP the CDROM BOOT file and un zipped it. Unfortunately It wont auto start when i put disk in computer startup. Need support.. Is the windows format on disk causing problems? Well, the .iso files you get from the FreeBSD distribution are ISO image files that need to be burned directly to a disk. There is no other processing or formatting that may be done. I do not know what you mean by 'unzipped to a cd rom'. I have never done anything that sounded like that. You should just download the .iso file and burn in to a fresh cd and fixate it. Then boot it. jerry I've used Nero in the past on a Windows system to burn an ISO. You can download it (probably timebombed) from http://www.tucows.com/ I think. Instructions on burning and fixating are here: http://iso.snoekonline.com/iso.htm Regards, Depending on your windows (xp and later) it should be built-in (only a very basic one though). Double click and it should give an option to burn the disk. Once its completed, voila! You have the ultimate weapon in the computing world! Sorry... got carried away, but nearly accurate though :) - you have a bootable disk to install FreeBSD 8.2. Mostly you'll only need disk 1. The others have pkg files for certain applications, but you can download those as you need them automatically using pkg_add -r and connected to the internet. That way you get the updated versions as well. Better yet: try the ports instead. For more info on either check out the handbook http://www.freebsd.org/doc/handbook/. Good luck! ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Installing free bsd
On 12/12/2011 5:05 PM, Jerry McAllister wrote: On Mon, Dec 12, 2011 at 04:26:06PM -0600, Daniel Lewis wrote: do direct ftp to disk? And what do you mean by fixate? No. You ftp the file down to the local machine and then use a CD burning utility to burn file to the CD. Daniel, An ISO file is basically a snapshot of a CD (or DVD or BlueRay) disc. You need special software to burn the image to a CD. Do NOT open the ISO file and copy the contents to a CD; that won't work. Windows 7 includes the ability to burn an iso; right-click the .iso file and pick Burn disc image. For WinXP/Vista (or if you want a little more control in Win7), you need an iso burner program. Here's a free one I've used this in the past: http://www.ntfs.com/iso_burner_free.htm -- Noel Jones ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Installing free bsd
On Mon, Dec 12, 2011 at 5:48 PM, Noel noeld...@gmail.com wrote: On 12/12/2011 5:05 PM, Jerry McAllister wrote: On Mon, Dec 12, 2011 at 04:26:06PM -0600, Daniel Lewis wrote: do direct ftp to disk? And what do you mean by fixate? No. You ftp the file down to the local machine and then use a CD burning utility to burn file to the CD. Daniel, An ISO file is basically a snapshot of a CD (or DVD or BlueRay) disc. You need special software to burn the image to a CD. Do NOT open the ISO file and copy the contents to a CD; that won't work. Windows 7 includes the ability to burn an iso; right-click the .iso file and pick Burn disc image. For WinXP/Vista (or if you want a little more control in Win7), you need an iso burner program. Here's a free one I've used this in the past: http://www.ntfs.com/iso_burner_free.htm -- Noel Jones ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org I usually use k3b, think it is great for all cd -dvd burning and I have also followed the Handbook and used sysutils/cdrtools-devel and worked perfectly and didn't need kde. ed ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Implementation details of altq hfsc scheduler in pf 4.5
I've read everything I could find on the topic of configuring hfsc altq in pf (4.5, FreeBSD 9), but I still have no clear idea of how it is actually implemented. I even started looking through the source code, but that might take a while. My main questions are: 1. Difference between 'realtime' and 'linkshare'? 2. In service curve configuration (m1, d, m2), what is 'd' relative to? 3. Are priorities actually used for anything? For question 1, both settings seem to set a minimum guarantee. What is their relationship? For example, what will be the behavior of the following configuration: altq on $wan hfsc bandwidth 25Mb queue {one, two} queue one bandwidth 70% hfsc(default, realtime 20%) queue two bandwidth 30% hfsc(realtime 60%) I know that the sum of realtime options cannot exceed 80% and that 'bandwidth' is an alias for 'linkshare' when using a linear service curve (m2). So the question is, how will this configuration behave as both queues start to exceed their realtime allocations (total traffic is consuming more than 20Mb of bandwidth)? Question 2 comes out of the following phrase, which is repeated almost verbatim on every site I found: For the first d milliseconds the queue gets the bandwidth given as m1, afterwards the value given in m2. First 'd' milliseconds starting from when? Is it per-connection (i.e. time when the state is created)? That's what everyone seems to imply, but it's a per-queue configuration option (the queue gets...). Who gets what and when? How is the bandwidth shared between multiple connections, started at different times, within the same queue? Suppose I change my configuration as follows: altq on $wan hfsc bandwidth 25Mb queue {std, web} queue std bandwidth 70% hfsc(default, realtime 60%) queue web bandwidth 30% hfsc(realtime (20%, 1, 10%)) Queue 'std' will be used for all general outgoing traffic and is currently being fully utilized (at 25 Mb/s). Queue 'web' will be used for traffic from my web server. At T=0, a client outside of my network connects to the web server and begins downloading a large file. I assume that the 'std' queue is now throttled back to 70%, and the web client will receive about 30% of the total bandwidth. Is it the case that at T=10 seconds, the web traffic is reduced from 30% to 10% and std traffic goes up to 90%? This also goes back to the relationship between realtime and linkshare. The 'std' queue is only guaranteed 60%, no? Next, what happens if a second web client connects at T=15 seconds and begins downloading the same file? You now have packets for two separate connections, which were started at different times, being queued in 'web' with a non-linear service curve. What will each client receive (in terms of bandwidth) and when? Finally, the purpose of queue priorities is also not clear. Some sites advise to leave them out because hfsc relies entirely on bandwidth limits, while others specify priorities in a fashion similar to priq. What is actual effect of different queue priorities on hfsc scheduling? - Max ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
What's wrong with this code?
This tiny routine is in a .so loadable module I use. (It's part of the mailfront SMTP daemon.) static const char* date_string(void) { static char datebuf[64]; time_t now = time(0); struct tm* tm = gmtime(now); strftime(datebuf, sizeof datebuf - 1, %d %b %Y %H:%M:%S -, tm); return datebuf; } I was getting bogus dates. Running it under GDB, time() is returning -1, and setting errno to 22, which is EINVAL. Changing the call to time to time(NULL) or time(now) made no difference. I changed it to a call to gettimeofday(), which works fine. But what could the problem have been? When I splice this routine into a tiny test program that calls it and prints out the result, it works fine. The obvious problem, since it's in a .so, is that it's linking to something other than the system library time() function, but I did an nm on the .so, and it said this, which sure looks like the system time() function to me: U time@@FBSD_1.0 Setting a breakpoint in gdb gets a complaint about trying to set a breakpoint in /lib/libc.so.7. Any ideas what the problem was? R's, John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: What's wrong with this code?
In the last episode (Dec 13), John Levine said: This tiny routine is in a .so loadable module I use. (It's part of the mailfront SMTP daemon.) static const char* date_string(void) { static char datebuf[64]; time_t now = time(0); struct tm* tm = gmtime(now); strftime(datebuf, sizeof datebuf - 1, %d %b %Y %H:%M:%S -, tm); return datebuf; } I was getting bogus dates. Running it under GDB, time() is returning 1, -and setting errno to 22, which is EINVAL. Changing the call to time to time(NULL) or time(now) made no difference. The manpage says that time() can fail for any of the reasons described in gettimeofday(2), but time() actually calls clock_gettime(CLOCK_SECOND), which technically could return EINVAL if the first argument isn't a valid clock_id. CLOCK_SECOND is valid, though, so in practice it should never fail with EINVAL. You could try adding a printf to sys/kern/kern_time.c:kern_clock_gettime() to see if it's really failing there. I changed it to a call to gettimeofday(), which works fine. But what could the problem have been? When I splice this routine into a tiny test program that calls it and prints out the result, it works fine. The obvious problem, since it's in a .so, is that it's linking to something other than the system library time() function, but I did an nm on the .so, and it said this, which sure looks like the system time() function to me: U time@@FBSD_1.0 Setting a breakpoint in gdb gets a complaint about trying to set a breakpoint in /lib/libc.so.7. Setting a breakpoint in a llibc should work fine, since time() is a regular function and not a syscall stub. Have you built a libc with debugging symbols? ( easy way: add DEBUG_FLAGS=-g to the top of /usr/src/lib/libc/Makefile, and run make obj make clean make depend make make install in that directory ) Any ideas what the problem was? -- Dan Nelson dnel...@allantgroup.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: What's wrong with this code?
From: John Levine jo...@iecc.com wrote: This tiny routine is in a .so loadable module I use. (It's part of the mailfront SMTP daemon.) static const char* date_string(void) { static char datebuf[64]; time_t now = time(0); struct tm* tm = gmtime(now); strftime(datebuf, sizeof datebuf - 1, %d %b %Y %H:%M:%S -, tm); return datebuf; } I was getting bogus dates. Running it under GDB, time() is returning -1, and setting errno to 22, which is EINVAL. Changing the call to time to time(NULL) or time(now) made no difference. I changed it to a call to gettimeofday(), which works fine. But what could the problem have been? When I splice this routine into a tiny test program that calls it and prints out the result, it works fine. how about a tiny .so that includes -only- that routine, and a 3-line or so main() that links against -that- .so? The obvious problem, since it's in a .so, is that it's linking to something other than the system library time() function, but I did an nm on the .so, and it said this, which sure looks like the system time() function to me: U time@@FBSD_1.0 Setting a breakpoint in gdb gets a complaint about trying to set a breakpoint in /lib/libc.so.7. Any ideas what the problem was? The errorno value you report is *NOT* a defined return code for date(3). The libc date(3) will return only EFAULT, or EPERM, per the manpage. This lends credence to the possibility of a run-time linker issue. HOWEVER, there is also the possiblity of memory getting trashed -- in just the 'right' wrong way -- *elsewhere* in the code. OR a corrupted .so Mentioning O/S release level, and CPU architecture would be a good idea :) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: What's wrong with this code?
how about a tiny .so that includes -only- that routine, and a 3-line or so main() that links against -that- .so? not a bad idea. Mentioning O/S release level, and CPU architecture would be a good idea :) Oh sorry, FreeBSD 8.2 release, AMD64 R's, John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org