Re: Disabling ethernet link on an Intel nic?

2012-08-14 Thread Eugene Grosbein
11.08.2012 20:35, David Duchscher пишет:
 Greetings, 
 
 I have a need to turn off the link of an ethernet port on a Intel nic.  The 
 issue is not a big deal but one we would like to solve.  we have no way of 
 signaling an upstream router that a path is down but via turning off the link 
 of the ethernet port.  This would only be used when something goes wrong. The 
 hope is that we could automate some problems and handle other situations 
 remotely avoiding having to visit the system in person.
 
 Any thoughts?  We can modify the system so if it means modifying the driver 
 or some other code, I am willing to try.  Just need a little direction.
 
 Thanks for your time,

I made such patch a couple of years ago and run it in production with 
copper-based
em(4) and igb(4) NICs. The patch introduces new sysctls like 
dev.em.X.down_disables_link
and dev.igb.X.down.disables_link with default zero values. 
Setting sysctl dev.em.0.down_disables_link=1 makes ifconfig em0 down bring 
link down.

http://www.grosbein.net/freebsd/patches/em_sysctl-8.3.diff.gz
http://www.grosbein.net/freebsd/patches/igb_sysctl-8.3.diff.gz
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: /etc/resolv.conf getting over written with dhcp

2012-06-15 Thread Eugene Grosbein
15.06.2012 19:09, Varuna пишет:

 About 2***, so what are the conditions to be true to figure out that 
 /etc/resolv.conf has not changed?

There is simple solution: create file /etc/dhclient-enter-hooks
and override add_new_resolv_conf() there to do nothing:

add_new_resolv_conf() {
  return 0
}

Works just fine for my systems.

Eugene Grosbein
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Kernel threads inherit CPU affinity from random sibling

2012-02-24 Thread Eugene Grosbein
24.02.2012 18:45, Attilio Rao пишет:

 I have the pathological test-case for it:
 http://www.freebsd.org/cgi/query-pr.cgi?pr=165444

 
 A fix has been committed as r230984, it should apply to STABLE_9/8
 too, can you try it?
 
 Attilio
 
 

I will try but I already run my patch for netisr, so it would be difficult
to see what helps :-)
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Kernel threads inherit CPU affinity from random sibling

2012-02-24 Thread Eugene Grosbein
28.01.2012 20:22, Attilio Rao пишет:

 2012/1/28 Ryan Stone ryst...@gmail.com:
 On Fri, Jan 27, 2012 at 10:41 PM, Attilio Rao atti...@freebsd.org wrote:
 I think what you found out is very sensitive.
 However, the patch is not correct as you cannot call
 cpuset_setthread() with thread_lock held.

 Whoops!  I actually discovered that for myself and had already fixed
 it, but apparently I included an old version of the patch in the
 email.

 Hence this is my fix:
 http://www.freebsd.org/~attilio/cpuset_root.patch

 Oh, I do like this better.  I tried something similar myself but
 abandoned it because I misread how sched_affinity() was implemented by
 4BSD(I had gotten the impression that once TSF_AFFINITY is set it
 could never be cleared).
 
 Do you have a pathological test-case for it? Are you going to test the patch?

I have the pathological test-case for it:
http://www.freebsd.org/cgi/query-pr.cgi?pr=165444

Eugene Grosbein
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Kernel threads inherit CPU affinity from random sibling

2012-02-24 Thread Eugene Grosbein
24.02.2012 19:05, Attilio Rao пишет:
 2012/2/24, Eugene Grosbein eu...@grosbein.pp.ru:
 24.02.2012 18:45, Attilio Rao пишет:

 I have the pathological test-case for it:
 http://www.freebsd.org/cgi/query-pr.cgi?pr=165444


 A fix has been committed as r230984, it should apply to STABLE_9/8
 too, can you try it?

 Attilio



 I will try but I already run my patch for netisr, so it would be difficult
 to see what helps :-)
 
 Yes, I mean, can you back your patch out?

Ok, I will. The effect is random, so it will take some time
to make sure it works.

Eugene Grosbein
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: dummynet(4) kernel process CPU usage monitoring

2011-11-21 Thread Eugene Grosbein
Hi!

I need to draw graph of dummynet's CPU usage.
procstat -t 0 shows me TID (thread id) of dummynet kernel thread.
ps -Hxo time,lwp shows me total CPU time consumed by this thread.

Now I see this time has 9 seconds increase during 60 seconds of real time.
This should be 9/60=15% CPU usage, but top -SHP shows me 0.00% meantime.

Where is my error?

Please CC: me as I'm not in the list.

Eugene Grosbein
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: dummynet(4) kernel process CPU usage monitoring

2011-11-21 Thread Eugene Grosbein
21.11.2011 23:37, Ryan Stone пишет:
 On Mon, Nov 21, 2011 at 1:23 AM, Eugene Grosbein eu...@grosbein.pp.ru wrote:
 Hi!

 I need to draw graph of dummynet's CPU usage.
 procstat -t 0 shows me TID (thread id) of dummynet kernel thread.
 ps -Hxo time,lwp shows me total CPU time consumed by this thread.

 Now I see this time has 9 seconds increase during 60 seconds of real time.
 This should be 9/60=15% CPU usage, but top -SHP shows me 0.00% meantime.

 Where is my error?

 Which version are you running?  8.1-RELEASE and older have the problem
 that the scheduler and the CPU statistics gatherer are driven from the
 same clock.  For threads that tend to frequently wake up and run for
 less than a full tick(dummynet would appear to fall in this category)
 this means that CPU usage statistics are never captured at a point
 where those threads are running, so top shows 0% for those threads.
 
 I am told that some relatively recent timer-related work(eventtimer?)
 should have resolved the issue, which is definitely in 9.0 and might
 be in stable/8 and may even have made it into 8.2-RELEASE.

I run 8.2-STABLE of 16 October. During most busy hours top shows
some nonzero values but TIME obtained from ps(1) is still several times larger.

Eugene Grosbein
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: dummynet(4) kernel process CPU usage monitoring

2011-11-21 Thread Eugene Grosbein
21.11.2011 15:30, Luigi Rizzo пишет:
 On Mon, Nov 21, 2011 at 01:23:22PM +0700, Eugene Grosbein wrote:
 Hi!

 I need to draw graph of dummynet's CPU usage.
 procstat -t 0 shows me TID (thread id) of dummynet kernel thread.
 ps -Hxo time,lwp shows me total CPU time consumed by this thread.

 Now I see this time has 9 seconds increase during 60 seconds of real time.
 This should be 9/60=15% CPU usage, but top -SHP shows me 0.00% meantime.
 
 apart from the scaling on number of cores (e.g. if you have 8 cores
 the 15% becomes a bare 2%)

I have 4 cores (no hyperthreading) and it seems
that top -SHP does not scale anything in this mode.

 remember that percentages are computed
 with some kind of filtering (EWMA ?) so if the load of dummynet threads
 is bursty, the filter might eat most of it.

I do not understand what this filter is. Btw, dummynet load is steady here.
 
 not completely sure this explains a steady 0.00%, if that's is
 what you are seeing

Yes, I see 0.00% except of hours of most load where top shows about 10%
and ps shows about 30%.

Eugene Grosbein
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: dummynet(4) kernel process CPU usage monitoring

2011-11-20 Thread Eugene Grosbein
Hi!

I need to draw graph of dummynet's CPU usage.
procstat -t 0 shows me TID (thread id) of dummynet kernel thread.
ps -Hxo time,lwp shows me total CPU time consumed by this thread.

Now I see this time has 9 seconds increase during 60 seconds of real time.
This should be 9/60=15% CPU usage, but top -SHP shows me 0.00% meantime.

Where is my error?

Eugene Grosbein
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Does anyone use nscd?

2011-10-05 Thread Eugene Grosbein
04.10.2011 22:47, Sean M. Collins пишет:
 I've never heard of the utility until you mentioned it.
 
 I'd nuke it, since really there are more popular alternatives like Redis
 and Memcached in the ports tree that most people will reach for first.
 

Please look at http://www.freebsd.org/cgi/query-pr.cgi?pr=75855 before making 
final decision.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: boot0sio waits a minute

2011-02-08 Thread Eugene Grosbein
On 08.02.2011 02:15, Trever wrote:
 Does anyone know why boot0sio would wait about 1 minute before proceeding? 
 
 If this is a known issue I can't find anything about it.  I know there is a 
 bug with boot0cfg not changing the partition to boot to.  Don't know if this 
 is related.
 
 FreeBSD 8.2RC2 i386.  Boot blocks were compiled with speed 115200.  Installed 
 via nanobsd to a compact flash card on an Habey 6620II Z530, but there 
 doesn't seem to be anything wrong other than with boot0sio, or something with 
 how nanobsd installs boot0sio (NOT boot0- that works).  But I have checked 
 what nanobsd is doing, that seems ruled out, seems fine.  BIOS seems ruled 
 out.  Seems like boot0sio.
 
 Everything works in all manner of configurations, just this very annoying 
 long hang before boot0sio runs.  Again, boot0 does not do this.
 
 I'm not talking about the pause after it displays the boot partition 
 selection options.  It's before anything happens.  I get a blinking 
 underscore in the upper left hand corner of my screen (and nothing on the 
 serial port) for a very long minute before the system boots.  Doesn't matter 
 if I have serial attached or not, etc..

I've seen this too. I do not known a reason. And since I do not use physical 
serial console
I just replace boot0sio with boot0 while building NanoBSD and skip the problem 
:-)

Eugene Grosbein
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Querying bsnmpd through /var/run/snmpd.sock

2011-01-23 Thread Eugene Grosbein
Hi!

bsnmpd running with mibII module opens local socket /var/run/snmpd.sock
mentioned in snmp_mibII(3) manual page:

 The mibII module opens a socket that is used to execute all network
 related ioctl(2) functions.  This socket is globally available under the
 name mib_netsock.

How do I use the socket? I hope to be able to call mib_find_if_sys() function
from another process using the socket. Is there a documentation for this?

Eugene Grosbein
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


syscall

2010-10-18 Thread Eugene Grosbein
Hi!

I've written an utility in C that does not link libc normally,
instead it includes sys/syscall.h and calls syscall().
It works nice for FreeBSD8/i386.

Now I'm porting it to FreeBSD8/amd64 and just cannot find
how to call syscall() directly from C code.

For arm, i386 and mips there are:

lib/libc/arm/sys/syscall.S
lib/libc/i386/sys/syscall.S
lib/libc/mips/sys/syscall.S

What about amd64?

Eugene Grosbein

P.S. Please reply to the list.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: syscall

2010-10-18 Thread Eugene Grosbein
On 18.10.2010 18:11, Kostik Belousov wrote:
 On Mon, Oct 18, 2010 at 05:27:21PM +0700, Eugene Grosbein wrote:
 Hi!

 I've written an utility in C that does not link libc normally,
 instead it includes sys/syscall.h and calls syscall().
 It works nice for FreeBSD8/i386.

 Now I'm porting it to FreeBSD8/amd64 and just cannot find
 how to call syscall() directly from C code.
 Show what you tried to do. Syscall() at the C-level works the same
 (well, almost, but the differences are too subtle for this discussion)
 for all architectures.

I'm prepearing a binary that would start before /sbin/init
to make just a couple of ioctl(MDIOCATTACH)/nmount system calls
then execve(/sbin/init). It has to be small in size for NanoBSD build.
Detailed explanation (in russian) and source code are available here:
http://dadv.livejournal.com/105161.html

In short:

#include sys/syscall.h

#define MESGHello, world!\n
#define MESG_SZ sizeof(MESG)-1

int syscall(const int n, ...);

#define _exit(a)   syscall(SYS_exit, a)
#define write(a, b, c) syscall(SYS_write, a, b, c)

int errno;

int main() {
  write(1,MESG,MESG_SZ);
  _exit(0);
  return 0; /* make compiler happy */
}

 For arm, i386 and mips there are:

 lib/libc/arm/sys/syscall.S
 lib/libc/i386/sys/syscall.S
 lib/libc/mips/sys/syscall.S
 amd64 syscall() wrapper code is autogenerated.
 

 What about amd64?
 Indeed, what is your issue with amd64 ?

I cannot find a module to link with
to resolve syscall() symbol when I do not want to link with libc.

Eugene Grosbein
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: syscall

2010-10-18 Thread Eugene Grosbein
On 18.10.2010 18:11, Kostik Belousov wrote:

 For arm, i386 and mips there are:

 lib/libc/arm/sys/syscall.S
 lib/libc/i386/sys/syscall.S
 lib/libc/mips/sys/syscall.S
 amd64 syscall() wrapper code is autogenerated.

It seems, it's written here:

# less /usr/obj/usr/src/lib/libc/syscall.S
#include compat.h
#include SYS.h
RSYSCALL(syscall)

Well, I can just copy there three lines to ./syscall.S
and add the file to gcc command line.

Thanks.

Eugene Grosbein
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: syscall

2010-10-18 Thread Eugene Grosbein
On 18.10.2010 18:41, Garrett Cooper wrote:

 Official work similar to this was just committed yesterday at SVN r214006.
 Cheers,
 -Garrett

Thanks, interesting.

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Support for WD Advanced Format disks

2010-08-11 Thread Eugene Grosbein
On Wed, Aug 11, 2010 at 09:04:39AM +0300, Valentin Nechayev wrote:

  I'm looking into a clean, permanent solution for WD Green drives that
  use 4096-byte physical sectors.  To summarize the information I've
  collected so far:
 
 There is attempt to look from another side - is it really needed?
 Captain Obvious says that if one have a new disk, it's easy to format
 it properly - i.e. not xxx*16*63 but aligned on 4KB boundary. For
 example, set up geometry xxx*64*32 for all new disks and align GPT
 partitions on 1MB boundary. As soon as FS requests in FreeBSD are no
 less than 4KB in size, this would satisfy any disk.
 
 If 4KB sectors are our future for a few next years, this shall be
 implemented anyway...

Also, we have geom_cache for performance-sensetive setups anyway :-)

Eugene Grosbein
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: loader prompt: list / on other device

2010-06-23 Thread Eugene Grosbein
On 23.06.2010 23:03, rank1see...@gmail.com wrote:
 I've escaped to loader prompt:
 Current device is disk0s3a, from which this loader is running.
 
 My USB stick is device1 and device1s2a is UFS /, on which I would like to 
 reach some file or simply list directory.
 
 Syntax? 

I guess, you have to change 'currdev' variable to point to right diskX

Eugene Grosbein
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: AHCI Driver on ICH7 (27c08086) Chipset

2010-04-01 Thread Eugene Grosbein
Ali Mashtizadeh wrote:
 Hi Everyone,
 
 I have a new motherboard with an ICH7 chipset (G41) and the ata driver
 recognizes it as ATA_I82801GB_S1 (PCI ID 27c08086), but this card does
 not seem to work with the AHCI. Can anyone point me to why this is the
 case? I really need NCQ working for this machine.

http://www.intel.com/support/chipsets/imst/sb/cs-012304.htm
In short: ICH7R and ICH7M both have AHCI support but ICH7 does not.

Eugene Grosbein
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Email sent from at command going to the wrong account

2009-12-16 Thread Eugene Grosbein
Holger Kunst wrote:
 Hi,
 
 The at command sends an email with the output of the scheduled job. 
 I've experienced inconsistent results when running jobs, receiving 
 emails in accounts not associated with the user currently logged in.
 
 To reproduce in FreeBSD 7.2-RELEASE-p2
 
 Case #1
 login as user a (new shell through ssh)
 echo echo 1 | at now
 -- user a will receive an email containing 1 - this is as expected
 
 Case #2
 login as user a (new shell through ssh)
 login as user b
 exit
 echo echo 1 | at now
 -- user b will receive an email containing 1 - this is not as 
 expected, since I am user a again
 
 A look at the source for at reveals that at is getting the mailname 
 from getlogin(). Running a small test program that outputs getlogin(), 
 confirms the above behavior: A log-in and out of another account makes 
 getlogin() return that account's name, even though the shell has been 
 closed and we are back to the original shell and the original user a.
 
 Is this the intended behavior? Any hints would be appreciated.

This is known long-standing bug. FreeBSD-4.9 was affected (may be earlier)
and all versions after it:

http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/61355

The PR has some kind of patch in the Audit-Trail.

Eugene Grosbein
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: [patch] add pwait utility

2009-11-07 Thread Eugene Grosbein
On Fri, Nov 06, 2009 at 11:24:46PM +0100, Jilles Tjoelker wrote:

 I propose adding a small new utility to /usr/bin: pwait. Similar to the
 Solaris utility of the same name, it waits for any process to terminate.
 Some use cases I have in mind:
 
 * rc.subr's wait_for_pids. This is a cleaner and more efficient fix for
   PR conf/132766. In the rare case that /usr is not available, the old
   sleep(1) method can be used.
 * interactive use, e.g. to shut down the computer when some task is done
   even if the task is already running

I've always missed such command exactly for later case :-)
Vote for it.

Eugene Grosbein
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: SIGUNUSED

2009-11-07 Thread Eugene Grosbein
On Sat, Nov 07, 2009 at 03:17:49AM +0100, Alexander Best wrote:

 as a side not:
 our own easyedit does exactly what you said wasn't a good programming style.
 ;) check line 554 of contrib/ee/ee.c:
 
 for (counter = 1; counter  24; counter++)
 signal(counter, SIG_IGN);

Easy Editor is contributed software (now lives in contrib/).

Such naive signgal handling had already hurt it in the past,
f.e. plain ignore of SIGTTIN, SIGTTOU without sanity checks for
STDIN_FILENO, STDOUT_FILENO made it CPU hog for 'ee file '
or 'ee /dev/null' in early versions.

Eugene Grosbein
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Improving the kernel/i386 timecounter performance (GSoC proposal)

2009-03-27 Thread Eugene Grosbein
Prashant Vaibhav wrote:

 The primary idea is to improve the performance and resolution of
 gettimeofday() and friends by creating a efficient userspace implementation
 of these functions, along with some supporting modifications to the kernel.

Are you aware of CLOCK_*_FAST family of timecounters present
in FreeBSD 7.x? If not, you may want to take a look:

http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/time.h#rev1.71

Eugene Grosbein
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Determine if a kernel is built with a specific option?

2009-01-12 Thread Eugene Grosbein
 I was wondering how a autoconf configure script can determine if the
 kernel is built with a particular option. In this case the code I have
 can make use of the FreeBSD polling driver, which by default isn't
 built into a kernel. So I want my configure script to determine if the
 kernel supports it, if so sets a #define, otherwise doesn't.

You should not assume that compiled code does not need polling support
just because _buildbox_ doesn't have it enabled in time of build.
If the code builds here, it does not mean it will run here.

Eugene Grosbein
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: tcpdump filter for out/in traffic

2009-01-04 Thread Eugene Grosbein
On Sun, Jan 04, 2009 at 04:05:00PM +0200, KES wrote:

 There will be very usefull to have options for tcpdump to monitor
 incomint or outgoing traffic regardless of src/dst IPs or ports or protocol
 
 For example:
 
 kes# tcpdump -n -i rl4 out
 EXPECTED: show traffic outgoing on rl4
 ACTUAL: tcpdump: syntax error
 
 kes# tcpdump -n -i rl4 in
 EXPECTED: show traffic incoming on rl4
 ACTUAL: tcpdump: syntax error

Hi!

I use following trick for that:

tcpdump -n -p -i rl4 ether src me-rl4 # for outgoing
tcpdump -n -p -i tl4 not ether src me-rl4 # for incoming

And add MAC-address of rl4 to /etc/ethers with name 'me-rl4'
or just 'me' if you need not watch other interfaces this way.

Eugene Grosbein
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD kernel Debugging tools for Virtual Memory Module

2009-01-02 Thread Eugene Grosbein
On Thu, Jan 01, 2009 at 06:27:44PM -0800, Kamlesh Patel wrote:

 I am working on Virtual Memory parts of FreeBSD OS. My Problem is, whenever i 
 modify little code of vmpage.c file i need to build the whole kernel to check 
 the modification and i even am not able to debug the kernel code.
 
 Could anyone please inform me kernel Debugging tools for FreeBSD OS?

First, you need to recompile source you change for sure :-)
But you have not rebuild all other files all the time.
You need to add to your /etc/src.conf (or /etc/make.conf for 6.x and earlier):

MODULES_WITH_WORLD=yes

This will skip rebuilding of all modules during 'make buildkernel'
but you MUST to copy all modules from /boot/kernel to /boot/modules
(all files other than /boot/kernel/kernel*) if you do this.
Otherwise, you'll lose modules and system may not boot due to missing
vital modules like acpi.ko

Then, if you do not change kernel config file,
recompile your changes with command (only second time and then):

cd /usr/src; make NO_KERNELDEPEND=yes NO_KERNELCLEAN=yes buildkernel

So, your rebuild time changes drastically: no modules rebuild,
no other sources rebuild other that you touched last time.
It will relink previously compiled object code with your changes only,
that's way much quicker. Reinstall kernel and reboot.

Second, you should use some kind of virtual machine (like qemu from ports)
to speedup your development cycle even more: install the system
into virtual machine and you'll need not another box to debug the kernel
and need not rebuild your development box. Test your changes with the system
installed into VM and reboot it only. Use ddb or kgdb already noted here.

Eugene Grosbein
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: forcefsck on booting stage

2008-07-28 Thread Eugene Grosbein
On Mon, Jul 28, 2008 at 04:11:49PM +0400, sam wrote:

 How to make 'fsck -f' on booting stage of remote system?

echo '/sbin/fsck -y -f'  /etc/rc.early
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: SCHED_4BSD bad interactivity on 7.0 vs 6.3

2008-07-13 Thread Eugene Grosbein
On Sun, Jul 13, 2008 at 03:11:23AM +0200, Kris Kennaway wrote:

 It seems like there has been a regression in interactivity from 
 6.3-RELEASE to 7.0-RELEASE when using the SCHED_4BSD scheduler.  After 
 upgrading my single-cpu amd64 box, 7.0 has much worse latency.  When 
 running a kernel compile, there is a noticeable lag to echo my typing or 
 scroll my browser windows, and playing an mp3 frequently cuts out for a 
 second or two.  This did not happen on 6.3-RELEASE.
 
 Are you sure it's not the x.org server bug that was present in the 
 version shipped with 7.0?

No, it's not. I have exactly the same problem with SCHED_4BSD
after upgrade from 6.3-STABLE to 7.0-STABLE. I didn't upgrade
my x.org 6.9.0, only OS (all 6.x compat shims are installed).
There is some sort of regression, certainly.

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


Re: ntpd jail problem

2008-06-08 Thread Eugene Grosbein
On Sun, Jun 08, 2008 at 12:25:00PM +0100, [EMAIL PROTECTED] wrote:

 The problem is that the ntpd in the jail seems to believe that the host
 clock is out of sync (from what I can gather), even though it isn't.

That's because ntpd won't blindly assume that your host has right time.
If you make client/server connection between your two copies of NTP daemons,
the server insures the client that time is right and client will serve
your network just right.

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


Re: Trying to support my product on BSD

2008-01-18 Thread Eugene Grosbein
On Fri, Jan 18, 2008 at 02:18:08PM +0530, navneet Upadhyay wrote:

My product is successfully running on Linux( all most all versions)
 and HP- UX and Windows .
   *It is 100 % C++ code*.
  I am planning to support it on FreeBSD, i have two queries :
 1. *How to build my code into binaries* on FreeBSD , i have my unix make
 files. Just to give an idea i have around 200 cpp files and they complile to
 5 binaries . I am using multithreading(posix on linux) and sockets heavily.
 2.* How to package the binaries*(RPM sort of thing). Idea is to provide a
 package to user who can install them binaries using this package by issuing
 single command.

First, please read The Porter's Handbook:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/index.html

If, after finishing, you still have a question, ask again :-)

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


Re: building images for running from flash

2007-06-13 Thread Eugene Grosbein
On Wed, Jun 13, 2007 at 02:06:42AM -0400, Z.C.B. wrote:

 Just been looking at rebuilding my router. I understand building the
 image and etc, but the issue I am running into is what to do about
 ports. To solve this, I am looking at building the image and using
 mdconfig, unionfs, and jail to solve building ports. Also looking
 at the possibility of qemu. Any thoughts or suggestions?
 
 Another annoying issue is the muckery involved with /etc/make.conf...
 The issue I am running into that is the CPUTYPE? option is different
 for the build machine and router that the flash will be used on. Any
 nice way to deal with this?

nanobsd(8)

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


Re: building images for running from flash

2007-06-13 Thread Eugene Grosbein
On Wed, Jun 13, 2007 at 09:07:45AM -0400, Z.C.B. wrote:

  nanobsd(8)
 
 I am aware of it, but it does not cover what I need for either
 questions, except for possibly the make part.

It does.

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


Re: usb keyboard attach crashes process usb0 (under FreeBSD4.11)

2007-04-03 Thread Eugene Grosbein
On Tue, Apr 03, 2007 at 09:31:05AM +, Norbert Koch wrote:

 First of all, I understand that there is no interest here in solving
 FreeBSD 4.11 problems. I only post this because there
 may be a chance that this could be a problem in CURRENT too.
 (If no, may be someone likes to dive into ancient software bugs ;-)
 
 I am running an embedded system under FreeBSD 4.11.
 Sometimes after booting FreBSD the USB keyboard is not found
 and so not automatically attached by usbd.
 If I then unplug the keyboard and plug it in again the
 kernel crashes with page fault in process 3 (usb0).

You didn't mention are you running 4.11-RELEASE or 4.11-STABLE.
If you are using RELEASE then you definitely should try latest 4.11-STABLE,
because there were lots of anti-panic fixes to RELENG_4 for USB subsystem
aftere 4.11-RELEASE.

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


Re: usb keyboard attach crashes process usb0 (under FreeBSD4.11)

2007-04-03 Thread Eugene Grosbein
On Tue, Apr 03, 2007 at 11:37:31AM +, Norbert Koch wrote:

 You didn't mention are you running 4.11-RELEASE or 4.11-STABLE.
 If you are using RELEASE then you definitely should try latest 4.11-STABLE,
 because there were lots of anti-panic fixes to RELENG_4 for USB subsystem
 aftere 4.11-RELEASE.
 
 Eugene Grosbein
   
 The entry in my sup-file is RELENG_4_11, not RELENG_4_11_0_RELEASE.
 So I think this is 4.11-STABLE, isn't it?

No, this is so-called '4.11-SECURITY' (unofficial name since some moment).
You need RELENG_4 in sup-file to obtain 4.11-STABLE, not RELENG_4_11.

I believe RELENG_4_11 has not mentioned fixes.

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


Re: Fwd: Abyssmal dump cache efficiency

2007-02-23 Thread Eugene Grosbein
On Thu, Feb 22, 2007 at 12:37:00PM -0500, Zaphod Beeblebrox wrote:

 Peter Jeremy wrote:
  I've found that you do get a worthwhile improvement in dump|restore
  performance by introducing a large (10's of MB) fifo between them.
  This helps reduce synchronisation between dump and restore (so that
  dump can continue to read whilst restore is busy writing a batch of
  small files and vice versa).  There's a suitable port but I can't
  recall the name because I wrote my own.
 
 There are several.  The most popular ones are probably
 misc/team and misc/buffer.
 
 I can certainly vouch for that , too.  I generally use team 1m 32 (total
 of 32meg of buffer).  Team seems to not want to buffer more than 1m per
 process and I think 32 is the max # of processes.

Someone, please take a look at trivial patch for team's buffer size here:
http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/106806

The maintainer timeout for the PR has occured long time ago.

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


Re: WITNESS RELENG_6

2007-01-04 Thread Eugene Grosbein
On Thu, Jan 04, 2007 at 01:48:49PM +0200, Kostik Belousov wrote:

  I've tried. Now machine just hangs if I try to switch from X to vty.
  It stays in graphics mode locked.
 
 Does it crash when exiting glxgears/some video player ?

It does not crash now when exiting glxgears but glxgears does not
exit really, this process hangs in the devdrn state.

mplayer hangs hard the whole system in the moment it switches to full-screen.

 When hangs, does it answer ping/allow ssh connections ?

Can't check just now, but can establish serial console if you wish.

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


Re: WITNESS RELENG_6

2007-01-04 Thread Eugene Grosbein
On Thu, Jan 04, 2007 at 12:37:08PM +0200, Kostik Belousov wrote:

 The problem is revealed by INVARIANTS option, not by WITNESS, and is 
 definitely the use-after-free.
 
 in src/nvidia_dev.c, nvidia_dev_close(), that is cdevsw.d_close proc,
 the destroy_dev() is called. Please, apply rev. 1.199 of sys/kern/kern_conf.c.
 I expect that crashes shall stop, but non-killable processes (in the devdrn)
 state would accumulate.
 
 Please, confirm.

I've tried to apply 1.199 to RELENG_6 but failed:
one of three chunks has been rejected.

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


Re: WITNESS RELENG_6

2007-01-04 Thread Eugene Grosbein
On Thu, Jan 04, 2007 at 01:02:08PM +0200, Kostik Belousov wrote:

 Hmm, it needs 1.198 as well. Below is aggregated patch against RELENG_6.
 
 Index: kern_conf.c
 ===
 RCS file: /usr/local/arch/ncvs/src/sys/kern/kern_conf.c,v
 retrieving revision 1.186.2.7
 diff -u -r1.186.2.7 kern_conf.c
 --- kern_conf.c   30 Oct 2006 15:43:56 -  1.186.2.7
 +++ kern_conf.c   4 Jan 2007 10:59:33 -
 @@ -676,16 +676,20 @@
   dev-si_flags = ~SI_CLONELIST;
   }
  
 + dev-si_refcount++; /* Avoid race with dev_rel() */
   csw = dev-si_devsw;
   dev-si_devsw = NULL;   /* already NULL for SI_ALIAS */
   while (csw != NULL  csw-d_purge != NULL  dev-si_threadcount) {
 - printf(Purging %lu threads from %s\n,
 - dev-si_threadcount, devtoname(dev));
   csw-d_purge(dev);
   msleep(csw, devmtx, PRIBIO, devprg, hz/10);
 + if (dev-si_threadcount)
 + printf(Still %lu threads in %s\n,
 + dev-si_threadcount, devtoname(dev));
 + }
 + while (dev-si_threadcount != 0) {
 + /* Use unique dummy wait ident */
 + msleep(csw, devmtx, PRIBIO, devdrn, hz / 10);
   }
 - if (csw != NULL  csw-d_purge != NULL)
 - printf(All threads purged from %s\n, devtoname(dev));
  
   dev-si_drv1 = 0;
   dev-si_drv2 = 0;
 @@ -700,6 +704,7 @@
   fini_cdevsw(csw);
   }
   dev-si_flags = ~SI_ALIAS;
 + dev-si_refcount--; /* Avoid race with dev_rel() */
  
   if (dev-si_refcount  0) {
   LIST_INSERT_HEAD(dead_cdevsw.d_devs, dev, si_list);

I've tried. Now machine just hangs if I try to switch from X to vty.
It stays in graphics mode locked.

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


Re: WITNESS RELENG_6

2007-01-04 Thread Eugene Grosbein
On Thu, Jan 04, 2007 at 02:12:45PM +0200, Kostik Belousov wrote:

I've tried. Now machine just hangs if I try to switch from X to vty.
It stays in graphics mode locked.
   Does it crash when exiting glxgears/some video player ?
  It does not crash now when exiting glxgears but glxgears does not
  exit really, this process hangs in the devdrn state.
 As expected.
  mplayer hangs hard the whole system in the moment it switches to 
  full-screen.
   When hangs, does it answer ping/allow ssh connections ?
  Can't check just now, but can establish serial console if you wish.
 It would be better to check this in both cases (mplayer and return to vty).

I've established ethernet and serial links with this box and checked.
In both cases this is X server locked in devdrn state.
All other processes and the kernel run just fine.

 But, most likely, the problem is in nvidia driver that calls destroy_dev()
 from d_close().
 
 You should ask the vendor for the fix. As a side note, responsible engineer
 is aware of the bug.

So, I need not bother him ones more?

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


WITNESS RELENG_6

2007-01-03 Thread Eugene Grosbein
Hi!

I try to find bugs in 6.2-PRERELEASE by using it (q) :-)
The question is: are kernel options WITNESS/WITNESS_KDB expected
to be in usable kernel? I don't worry about performance overhead here.

The problem is, I've found this is nearly impossible to run
my home system with RELENG_6 build from yesterday's sources,
X.org 6.9.0, mplayer etc. without panicing and crashdump generation
after an hour or so. Just switch from X to vty and logon gave me another
LOR and crashdump. One of these you can see here:

http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/107455

Perhaps, I should not use these options for everyday STABLE use?

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


Re: (feature change request) remove link-layer generated routes from netstat -r

2006-02-24 Thread Eugene Grosbein
On Wed, Feb 22, 2006 at 03:50:17PM +0200, Nikos Vassiliadis wrote:

 netstat -r prints link-layer generated routes and many
 times the output becomes somehow obscure. For
 example:
 
 [EMAIL PROTECTED]:0:/usr/home/src/FreeBSD-6/src/usr.bin/netstat# netstat 
 -ranfinet
 Routing tables
 
 Internet:
 DestinationGatewayFlagsRefs  Use  Netif Expire
 default10.1.1.244 UGS 031016rl0
 10.1.1/24  link#1 UC  00rl0
 10.1.1.181 00:0f:1f:fb:02:f5  UHLW10rl0
 10.1.1.182 00:e0:fc:38:d4:40  UHLW10rl0
 10.1.1.183 00:e0:fc:65:07:fd  UHLW10rl0
 10.1.1.244 00:50:fc:fe:74:3b  UHLW21rl0
 10.1.1.254 00:0c:cf:70:50:06  UHLW10rl0
 127.0.0.1  127.0.0.1  UH  0 1117lo0
 192.168.1  link#5 UC  00   fxp0
 192.168.1.25   00:05:5d:4d:19:58  UHLW10   fxp0
 192.168.1.45   00:11:43:b6:a1:55  UHLW10   fxp0
 192.168.1.71   00:0c:f1:b9:38:50  UHLW1 1645   fxp0
 192.168.1.84   00:04:23:af:79:66  UHLW10   fxp0
 192.168.1.112  00:30:4f:21:3b:8a  UHLW10   fxp0
 192.168.1.196  00:07:e9:40:1f:c5  UHLW10   fxp0
 192.168.1.199  00:e0:81:21:28:21  UHLW10   fxp0
 192.168.1.200  00:30:4f:03:88:03  UHLW10   fxp0
 
 
 when the information I was actually looking for is:
 
 [EMAIL PROTECTED]:0:/usr/home/src/FreeBSD-6/src/usr.bin/netstat# netstat 
 -rnfinet
 Routing tables
 
 Internet:
 DestinationGatewayFlagsRefs  Use  Netif Expire
 default10.1.1.244 UGS 031016rl0
 10.1.1/24  link#1 UC  00rl0
 127.0.0.1  127.0.0.1  UH  0 1117lo0
 192.168.1  link#5 UC  00   fxp0
 [EMAIL PROTECTED]:0:/usr/home/src/FreeBSD-6/src/usr.bin/netstat# 
 
 
 The attachment patch (cvs diff -u -rHEAD route.c generated) prints
 link-layer generated routes when -a is specified and ignores them
 the rest of the time.
 
 Thoughts? POLA violation?

Just use:

netstat -rn | awk '$3 !~ /L/ { print }'

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


Re: (feature change request) remove link-layer generated routes from netstat -r

2006-02-24 Thread Eugene Grosbein
On Thu, Feb 23, 2006 at 09:56:46AM +0200, Nikos Vassiliadis wrote:

  Just use:
 
  netstat -rn | awk '$3 !~ /L/ { print }'
 
 That's exactly the point Eugene, I don't want to find ways to filter it out.
 It happens frequently. I didn't say it's difficult to remove it, I just don't 
 want it there all the time. That's why you can use -a to get the old
 behavior.

Just make ~/bin/netstat that will filter for you most of the time.

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


Re: Low umass performance with USB 2.0 ports

2005-08-30 Thread Eugene Grosbein
Eygene A. Ryabinkin wrote:
 
   Good day.
  I am observing very low umass performance: when I am trying to move a large
 file from/to my USB 2.0 flash that is plugged into the USB 2.0 port: transfer
 starts fine at 3.5 Mb/sec, but after some 20 Mbytes it hangs and the process
 (dd) stay in the wdrain state. The activity LED on the flash shows no 
 activity.
 Operations do continue, but very slow and the most time of the copying process
 spends in the wdrain state. All attempts to invoke `sync` or to see the
 file state via `ls` are hanging until `dd` leaves the wdrain state.
  It does not matter what flash is used: I tried Apacer and the Kingmax ones --
 the result is the same.
  If I plug the flash into the USB 1.1 port and trying to move some data -- it
 works fine, no hangs. Speed is 500 Kb/sec.

What is filesystem has your USB drive?
FreeBSD 4.x had very low performance with FAT filesystem,
writing process spent lots of time in the wdrain state too.

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


writing ktrace output to serial port

2004-06-21 Thread Eugene Grosbein
Hi!

I'm trying to debug kernel panic in 4.10-STABLE.
It is 100% repeatable in my environment but this environment is very
customized and it would be hard for others to reproduce it in my way
(this includes non-standard build of libvgl and mplayer and his libs).

So I want to see what is happening just before my mplayer crashes the kernel.
The problem is that ktracing mplayer does not help as filesystem can't keep
ktrace.out being written just before crash. I tried 'sync' mount,
it does not help too.

I decided to divert ktrace.out to /dev/cuaa0 so another FreeBSD will keep it.
However, ktrace() in src/sys/kern/kern_trace.c does not permit writing to
non-regular file. Why?

Eugene Grosbein

P.S. Please CC: me as I'm not in a list.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: writing ktrace output to serial port

2004-06-21 Thread Eugene Grosbein
Julian Elischer wrote:

   I decided to divert ktrace.out to /dev/cuaa0 so another FreeBSD will keep
   it. However, ktrace() in src/sys/kern/kern_trace.c does not permit writing
   to non-regular file. Why?

  As for your problem..
  Can you NFS mount? If you have no ethernet you could NFS mount over
  PPP/SLIP :)
  (or PLIP if you have a parallel port)
 
 
 it would be relatively easy to sent it to a netgraph ng_ksocket node and
 have the record sent out as a udp packet :-)

Thank you, people, for your time.
But my question was not how to solve my problem. (I do no rely on NFS
when sender system is going to crash and is not so familiar with netgraph.)

I just removed check from kernel source and now ktrace successfully writes
to /dev/cuaa0 in test cases (I've not tried to reproduce the crash yet).
So the question is: why is the check for regilar file there?

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


Re: Testers needed: Joe's MFC of USB code

2004-02-27 Thread Eugene Grosbein
 IO_GAME

# Pseudo devices - the number indicates how many units to allocated.
pseudo-device   loop# Network loopback
pseudo-device   ether   # Ethernet support
pseudo-device   sl  2   # Kernel SLIP
pseudo-device   ppp 2   # Kernel PPP
pseudo-device   tun # Packet tunnel.
pseudo-device   pty 16  # Pseudo-ttys (telnet etc)
#pseudo-device  md  # Memory disks
pseudo-device   gif 4   # IPv6 and IPv4 tunneling
pseudo-device   faith   1   # IPv6-to-IPv4 relaying (translation)
pseudo-device   snp
#pseudo-device  vn
pseudo-device   gzip# Exec gzipped a.out's
pseudo-device   speaker

# The `bpf' pseudo-device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
pseudo-device   bpf #Berkeley packet filter
options MSGBUF_SIZE=40960

device pcm

#optionsQUOTA
options IPFIREWALL
options IPFIREWALL_VERBOSE
options IPFW2
options IPDIVERT

options DUMMYNET
options SOFTUPDATES

#device smbus0
#device iicbus0
#device iicbb0
#device intpm0
#device smb0at smbus?

device  smbus
#device iicbus
#device iicbb
device  intpm
#device alpm
#device ichsmb
device  smb

#device ic
#device iic
#device iicsmb

options DDB
options DDB_UNATTENDED

#optionsLIBMCHAIN
#optionsLIBICONV
#optionsNETSMB
#optionsNETSMBCRYPTO

options RANDOM_IP_ID
#optionsSMBFS

options UFS_DIRHASH
options PQ_CACHESIZE=128# color for 128k/16k cache
options SHOW_BUSYBUFS

device  uhci
#device ohci
device  usb
device  uscanner
device  ugen
device  uhid
device  ucom
device  tap

#optionsSHUTDOWN_BEEP

options IPSEC   #IP security
options IPSEC_ESP   #IP security (crypto; define w/ IPSEC)

options INVARIANTS
options INVARIANT_SUPPORT

device  agp
device  radeondrm


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


syslog

2004-01-03 Thread Eugene Grosbein
Hi!

[EMAIL PROTECTED] wrote 8 years ago in src/lib/libc/gen/syslog.c:

p += sprintf(p, %.15s , ctime(now) + 4);

What is '+ 4' for?

http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/gen/syslog.c.diff?r1=1.2r2=1.3

Eugene Grosbein

P.S. Please CC me, I'm not in list
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: syslog

2004-01-03 Thread Eugene Grosbein
Eugene Grosbein wrote:


 [EMAIL PROTECTED] wrote 8 years ago in src/lib/libc/gen/syslog.c:
 
 p += sprintf(p, %.15s , ctime(now) + 4);
 
 What is '+ 4' for?

Oh, I've got it. Please ignore this question, sorry.

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


Re: kern.vm.kmem.size

2001-11-15 Thread Eugene Grosbein

  So, how can I estimate needed value of kern.vm.kmem.size?
 
 How much ram do you have in the machine? On a 4.4-RC1 machine

I have 320M here.

 with 128MB of ram we don't have any problems getting dirhash
 to use almost all of it's 2MB:
 
 vfs.ufs.dirhash_maxmem: 2097152
 vfs.ufs.dirhash_mem: 2085797
 
 This is with the devault value for kern.vm.kmem.size. Maybe
 you could print the value your system is getting with:
 
 echo print vm_kmem_size |  gdb -k /kernel /dev/mem

You are absolutely right, it's using about 1/3 of RAM here 
(108875776 when I do not tune kern.vm.kmem.size). 
Hmm, my test seems to be incorrect somehow.
How can I see used amount of kernel malloc area?

Eugene Grosbein

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: kern.vm.kmem.size

2001-11-13 Thread Eugene Grosbein

On Tue, Nov 13, 2001 at 03:13:29PM +, David Malone wrote:

  I'm trying to test and tune speed of freebsd's filesystem in many aspects.
  I run recent FreeBSD 4.4-STABLE with new dirprefs code, read tuning(7),
  newfs'd my FS, turned softupdates on, have UFS_DIRHASH kernel option.
  Also, I've read DIRHASH kernel code source. It seems that efficiency of
  DIRHASH greatly depends of kernel memory size (and some experiments
  approve this).
 
 You should be able to control how much memory is used by dirhash
 with the vfs.ufs.dirhash_maxmem sysctl. By default it uses up to
 2MB and it should be possible to raise it significantly, providing
 you have enough physical memory. (By default there is about 1GB of
 kernel address space, so you are unlikely to be running into this
 limit - I don't think changing kern.vm.kmem.size will help you).

Are you shure? From LINT:

# Tune the kernel malloc area parameters.  VM_KMEM_SIZE represents the
# minimum, in bytes, and is typically (12*1024*1024) (12MB).
# VM_KMEM_SIZE_MAX represents the maximum, typically 200 megabytes.
# VM_KMEM_SIZE_SCALE can be set to adjust the auto-tuning factor, which
# typically defaults to 4 (kernel malloc area size is physical memory
# divided by the scale factor).
#
options VM_KMEM_SIZE=(10*1024*1024)
options VM_KMEM_SIZE_MAX=(100*1024*1024)
options VM_KMEM_SIZE_SCALE=4

It seems DIRHASH is limited with free space in the kernel malloc area.
It even cannot utilize default 2M of vfs.ufs.dirhash_maxmem when I do not
increase kern.vm.kmem.size. I think it's because of kernel malloc area
exhaustion. However, when I increase kern.vm.kmem.size upto 64M and
vfs.ufs.dirhash_maxmem upto 8M, it starts using more than 2M of
dirhash memory and speed of my tests greatly improves.

So, how can I estimate needed value of kern.vm.kmem.size?

Eugene Grosbein

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: porting OpenSSH to 2.2.8

2001-11-13 Thread Eugene Grosbein

On Tue, Nov 13, 2001 at 02:56:24PM -0700, Kirk Davis wrote:

   I have a number of older FreeBSD boxes (running 2.2.8-STABLE) and 
 I am not able to upgrade beyond 2.2.8 due to some custom software.
   Has anyone managed to get a newer version of OpenSSH running on 
 a 2.2.8 box?  I'm not a C programer but I have ported some programs in 
 the past.  I'm not having a lot of luck and was hoping that someone out 
 there had already invented the wheel.

I had installed OpenSSH to 2.2.5 a couple of months ago. 
All that you need is:

1. Only if you do not have perl5 installed.
   Take distfile and patches from current ports tree for perl5.
   You can build and install it manually with no problems.
2. Take distfile and patches from current ports tree for openssl.
   You can build and install it manually with no problems, too.
3. The same with openssh-portable from ports.

Eugene Grosbein

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: Cron pickle

2001-09-16 Thread Eugene Grosbein

On Mon, Sep 17, 2001 at 12:17:30PM +1000, Greg Black wrote:

 | I need to be able to run a particular program at the last
 | minute of each month and yes I know it would be much easier to
 | run it at the first minute of each month, but my hands are tied
 | and my brain is too puny to work it out.
 
 This cannot be done with cron, even with multiple entries.  You
 can use cron to schedule something for minute zero of each month
 and that should be good enough for any reasonable use.

This can be done with cron with single entry and small overhead.
Run whis script at last minute of every day (or every 28-31):

#!/bin/sh

tomorrow=`date -v+1d %d`
if [ $tomorroq -ne 01 ]; then 
  exit  # if tomorrow is not begin of month, do nothing
fi

# do work now
...

Eugene Grosbein

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: Cron pickle

2001-09-16 Thread Eugene Grosbein

Greg Black wrote:
 
 Eugene Grosbein wrote:
 
 | On Mon, Sep 17, 2001 at 12:17:30PM +1000, Greg Black wrote:
 |
 |  | I need to be able to run a particular program at the last
 |  | minute of each month and yes I know it would be much easier to
 |  | run it at the first minute of each month, but my hands are tied
 |  | and my brain is too puny to work it out.
 | 
 |  This cannot be done with cron, even with multiple entries.  You
 |  can use cron to schedule something for minute zero of each month
 |  and that should be good enough for any reasonable use.
 |
 | This can be done with cron with single entry and small overhead.
 | Run whis script at last minute of every day (or every 28-31):
 |
 | #!/bin/sh
 |
 | tomorrow=`date -v+1d %d`
 | if [ $tomorroq -ne 01 ]; then
 |   exit# if tomorrow is not begin of month, do nothing
 | fi
 |
 | # do work now
 
 Sure:
 
 $ date -v+1d %d
 date: illegal time format
 usage: date [-nu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
 [-f fmt date | [cc]yy]mm]dd]HH]MM[.ss]] [+format]

Sorry, my example is full of mistakes. Really it should look like this:

#!/bin/sh

tomorrow=`date -v+1d +%d`
if [ $tomorrow -ne 01 ]; then
  exit
fi

# proceed now

Eugene Grosbein

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



libvgl

2001-07-01 Thread Eugene Grosbein

Hi!

Will switching of virtual consoles via keyboard work
for application using libvgl's keyboard mode VGL_CODEKEYS?
It seems that the process receives codes for 'ALT pressed', 'F1 pressed',
'F1 released', 'Alt released' but no signal USR1 used by libvgl.
The man page VGLInit(3) does not cover this situation.
My system is FreeBSD 4.3-STABLE

Eugene Grosbein

P.S. Please CC me when replying. Thank you.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: libvgl

2001-07-01 Thread Eugene Grosbein

On Mon, Jul 02, 2001 at 11:14:01AM +0900, Kazutaka YOKOTA wrote:

 syscons dosn't automatically switch vtys if the keyboard is not in the
 XLATE mode. (Oh well, this isn't documented in vgl(3), *sigh*)
 
 In CODEKEYS and RAWKEYS modes, you need to initiate vty switching
 by yourself, by calling the ioctl VT_ACTIVATE when a key combination
 for vty switching is seen.

Thank you very much.
Can you please point me to the right place where I can read
about syscons's ioctl, it's possibilities and semantics?
RTFS around dev/syscons is not enough.

Eugene Grosbein

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message