Re: How can process in STOP state consume 200% CPU?

2011-06-28 Thread Josh Carroll
On Tue, Jun 28, 2011 at 11:40 AM, Yuri wrote: > I got VirtualBox process in a strange state. It has the status STOP but > shows by top as consuming 200% CPU for a very long time. > How is this possible and what does this mean? Process time stays at 0:00 > TIME. kill -9 doesn't kill it. > >  PID US

How to use Core i7 turbo

2011-05-19 Thread Josh Carroll
I'm running FreeBSD 8.2-RELEASE/amd64 on a Core i7 2600k system with the ASUS P8Z68-V PRO motherboard. I'm trying to get the turbo mode (http://en.wikipedia.org/wiki/Intel_Turbo_Boost) to work in FreeBSD, but I can't seem to make it happen. I've tried: 1. auto settings (3.4 GHz base frequency, 3.

Re: ifnet struct interface type

2006-11-24 Thread Josh Carroll
I was planning on using this value to distinguish what sort of connection each interface is using but obviously with both returning IFT_ETHER this is not possible, any help is much appreciated! It would probably be better to query the interface's media setting instead, since you may have a gigab

Re: sockstat tcp/udp switches

2006-11-10 Thread Josh Carroll
Below is the patch using strsep instead. I also updated the gather_inet function to print a message that a protocol is not supported if it exists in /etc/protocols, but does not have a case in the gather_inet function. So, anyone interested in committing this? :) Do people think this would be us

Re: sockstat tcp/udp switches

2006-11-07 Thread Josh Carroll
Below is the patch using strsep instead. I also updated the gather_inet function to print a message that a protocol is not supported if it exists in /etc/protocols, but does not have a case in the gather_inet function. patch is here if you'd rather just fetch it: http://pflog.net/~floyd/sockstat

Re: sockstat tcp/udp switches

2006-11-07 Thread Josh Carroll
On other suggestion I'd have it to consider using strsep to parse the string. I'm pretty the code will be smaller and more readable. Good point. And yes, per the other mail I do need to fix the MAX_PROTO_LEN checking, but I'll make sure that is proper when I update it to use strsep. Josh

Re: sockstat tcp/udp switches

2006-11-06 Thread Josh Carroll
I suggest you use /etc/protocols rather than hard code the protocols. This will make the code future-proof. See getprotoent(3) for the correct way to read /etc/protocols. Thanks Peter, that's a great idea. Below is a new patch that uses getprotoent(3). For now, to maintain backward compatibilit

Re: sockstat tcp/udp switches

2006-11-03 Thread Josh Carroll
Below is an initial attempt at the -P argument implementation. I'm not sure if the method used to parse out the protocol is "up to snuff" for the FreeBSD project, but I'm welcome to suggestions/advice/etc. I tested the previous behavior and given the exact command line, sockstat works the same p

Re: sockstat tcp/udp switches

2006-11-02 Thread Josh Carroll
Can we have something that doesn't need one option letter for each protocol, protocol family or socket type, please? :) I'd be willing to modify it to take a -P argument with one of: tcp udp tcp,udp udp,tcp If the consensus is to add -P, I'd be happy to make the changes. I assume without -P we

Re: sockstat tcp/udp switches

2006-11-02 Thread Josh Carroll
I haven't tested yet, but I think in the options structure you should use : + {"ipv6", 0, NULL, '6'}, instead of: + {"ipv6", 0, NULL, 0}, Oops, thanks for catching that. Fixed that in the new patch below. also for portability yo

sockstat tcp/udp switches

2006-10-31 Thread Josh Carroll
All, I have added two options to the sockstat command to list tcp and/or udp sockets. -t ([-]-tcp) :display tcp sockets -d ([-]-udp) : display udp sockets The previous command line options are unchanged, although I did change the use of getopt to getopt_long_only and added long options