block device

2006-12-14 Thread Uladzislau Rezki
Hi !!!

ls -al /dev/ show me:
crw-r-   1 root   operator0,  86 Dec 14 11:47 ad0
crw-r-   1 root   operator0,  87 Dec 14 11:47 ad0s1
crw-r-   1 root   operator0,  91 Dec 14 13:47 ad0s1a
crw-r-   1 root   operator0,  92 Dec 14 13:47 ad0s1b
crw-r-   1 root   operator0,  93 Dec 14 11:47 ad0s1c

ad0 is a character device. Why ad0 isn't a block device?

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


Re: block device

2006-12-14 Thread Rink Springer
Hi,

On Thu, Dec 14, 2006 at 01:21:24PM +0200, Uladzislau Rezki wrote:
 ad0 is a character device. Why ad0 isn't a block device?

FreeBSD 5 and up no longer make a distinction between character/block
devices. More information on this subject can be found in The Design
and Implementation of the FreeBSD operating system by McKusick and
Neville-Neil.

-- 
Rink P.W. Springer- http://rink.nu
It's you isn't it? THE BASTARD OPERATOR FROM HELL!
In the flesh, on the phone and in your account...   - BOFH #3


smime.p7s
Description: S/MIME cryptographic signature


Re: block device

2006-12-14 Thread Uladzislau Rezki
Rink Springer [EMAIL PROTECTED] writes:

 Hi,

 On Thu, Dec 14, 2006 at 01:21:24PM +0200, Uladzislau Rezki wrote:
 ad0 is a character device. Why ad0 isn't a block device?

 FreeBSD 5 and up no longer make a distinction between character/block
 devices. More information on this subject can be found in The Design
 and Implementation of the FreeBSD operating system by McKusick and
 Neville-Neil.

 -- 
 Rink P.W. Springer- http://rink.nu
 It's you isn't it? THE BASTARD OPERATOR FROM HELL!
 In the flesh, on the phone and in your account...   - BOFH #3

Many thanks !

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


Re: [PATCH] automated make -j value

2006-12-14 Thread Andrzej Tobola
Hello David,

I was using hw.ncpu. Which one is better ?

% sysctl -n kern.smp.cpus hw.ncpu
1
1
% ssh vol sysctl -n kern.smp.cpus hw.ncpu
2
2
% ssh vol2 sysctl -n kern.smp.cpus hw.ncpu
4
4


cheers,
-a

On Wed, Dec 13, 2006 at 08:19:52PM -0800, David O'Brien wrote:
 With multi-socket systems becoming more prevalent, and the continued
 increase in cores per processors, I thought it would be nice for
 'make -j' to gain some automation.
 
 Attached is a patch that makes -j- be the same as
 -j `sysctl -n kern.smp.cpus` and -j= be twice that.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: portupgrade and dependencies

2006-12-14 Thread Eugene M. Kim
Unfortunately, the semantics of -r and -R options of pkg_info is the 
opposite of the semantics used by pkgtools (such as 
portupgrade/portinstall, pkg_glob and so on).


Eugene

Marek Denis wrote:

On Tue, Dec 12, 2006 at 05:55:40PM -0500, Dino Michailidis wrote:
  

portupgrade -r will also upgrade packages that depend on the port you are
upgrading.  It seems that this is not what you want.

portupgrade -R will also upgrade packages required by the port you are
upgrading - I believe this *is* what you want.




Well, I don't get it.
When I type:

pkg_info -R libiconv-1.9.2_1

it shows many of the packages (ettercap too)
so it is required by ettercap to work properly, yes?
And when I type 
pkg_info -r ettercap


it shows libiconv as a dependant, it mean a package which is required to
work ettercap properly, yes?
And that I have always thought -r option with portupgrade was all right
for me.
  

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


Re: [PATCH] automated make -j value

2006-12-14 Thread Kurt J. Lidl
On Wed, Dec 13, 2006 at 08:19:52PM -0800, David O'Brien wrote:
 With multi-socket systems becoming more prevalent, and the continued
 increase in cores per processors, I thought it would be nice for
 'make -j' to gain some automation.
 
 Attached is a patch that makes -j- be the same as
 -j `sysctl -n kern.smp.cpus` and -j= be twice that.
 
 comments?  (redirected back to list)

I think you can do it better than this, by just support
setting the concurrancy level via reading a environmental
variable.  Like say NPROC, which is what CrayOS used, and
also appeared in the BSD/OS pmake varient several years ago.

Then you can just do this:
export NPROC=`/sbin/sysctl hw.ncpu | awk '{print $3*2}'`
or this:
export NPROC=`/sbin/sysctl hw.ncpu | awk '{print $3}'`
in your shells .rc files.

(Obviously, change the sysctl node as appropriate for your OS.)

I found this really useful when compiling a large tree of
sources, where some of the Makefiles didn't have their dependencies
written correctly, sucht that a parallel make wouldn't work
properly.  It's easy to turn off, just by unsetting the
environmental variable.  It's also easy to iterate over a set
of values to figure out which one will compile a tree the
fastest.  (FYI -- setting 3*hw.ncpu was optimal for BSD/OS.)

If you hack on make to put in automagic around -j, you should
add the environmental variable support too.  It's actually more
useful in a lot of cases.  (Mostly cause you don't have to
touch any Makefile to turn it on, it just works...)

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


Capturing Parallel Port Data

2006-12-14 Thread Mr CW

Hi Guys,

I have been reading the ppi man page and have searched Google but have not 
found an answer to my problem:  I work at a business which uses cable 
testers that output plain text to a dot matrix printer (any old DMP will 
work).  (Cirris cable testers)  The paper trail is getting huge so I am 
trying to write a program that does the following:


Prompts the user for the cable part number
Reads data from the parallel port, which is connected to the parallel output 
of a Cirris tester

Prompts for any notes regarding the cable
Inputs the data into a database table

Now, my real question is:  how do I read data from the parallel port on the 
FreeBSD computer that is coming from the tester which is trying to 'print' 
to the FBSD computer's parallel port?  Is there a suggested pinout for a 
parallel crossover calbe to accomplish this task with ppi?  Is the crossover 
cable even required?


Finally, is there a FBSD-sanctioned parallel port driver for use with Perl 
instead of using ppi and C?


Any and all help is welcomed and apriciated.

-J. Hunt

_
Get free, personalized commercial-free online radio with MSN Radio powered 
by Pandora http://radio.msn.com/?icid=T002MSN03A07001


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


Re: Capturing Parallel Port Data

2006-12-14 Thread soralx

 Now, my real question is:  how do I read data from the parallel port
 on the FreeBSD computer that is coming from the tester which is
 trying to 'print' to the FBSD computer's parallel port?  Is there a

did you try to set LPT0 mode to bi-directional in the BIOS, and then
`cat /dev/lpt0`?

 suggested pinout for a parallel crossover calbe to accomplish this
 task with ppi?  Is the crossover cable even required?

as I understand it, either the 8 parallel lines can be driven on both
sides to send data both ways, or the 5 control inputs (paper out, ACK,
busy, etc) are used to receive data, or both.

 -J. Hunt

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


Kernel hang on 6.x

2006-12-14 Thread Brian Dean
Hi,

We're experiencing a kernel hang on a 6.x quad processor Sun amd64
based system.  We are able to reproduce it fairly reliably, but the
environment to do so is not easily replicatable so I cannot provide a
simple test case.  However, I have been able to build a debug kernel
and when the system hangs, I can break to the debugger prompt.  But
once there, I'm not sure what to do to isolate where the system is
hung up.  I have confirmed that the hang occurs in both SMP and
uniprocessor mode.  Here are some system details:

uname -a:
FreeBSD bb02f54 6.2-BETA2 FreeBSD 6.2-BETA2 #4: Wed Dec 13 11:43:38 EST 2006
 [EMAIL PROTECTED]:/usr/src/sys/amd64/compile/BBKERN  amd64

FreeBSD 6.2-BETA2 #4: Wed Dec 13 11:43:38 EST 2006
[EMAIL PROTECTED]:/usr/src/sys/amd64/compile/BBKERN
WARNING: WITNESS option enabled, expect reduced performance.
Timecounter i8254 frequency 1193182 Hz quality 0
CPU: Dual Core AMD Opteron(tm) Processor 275 (2193.76-MHz K8-class CPU)
  Origin = AuthenticAMD  Id = 0x20f12  Stepping = 2
  
Features=0x178bfbffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT
  Features2=0x1SSE3
  AMD Features=0xe2500800SYSCALL,NX,MMX+,FFXSR,LM,3DNow+,3DNow
  AMD Features2=0x3LAHF,CMP
  Cores per package: 2
real memory  = 17179869184 (16384 MB)
avail memory = 16518569984 (15753 MB)
ACPI APIC Table: SUNX4200   

The hang appears to occur under heavy memory usage and usually seems
to happen when the process size approaches the size of swap.

If anyone can offer a suggestion as to what information from the db
prompt might help home in on this problem, please let me know.  A
simple backtrace wasn't terribly englightening, at least to me:

db bt
Tracing pid 18 tid 100011 td 0xff03e1563980
kdb_enter() at kdb_enter+0x2f
scgetc() at scgetc+0x43e
sckbdevent() at sckbdevent+0x83
kbdmux_intr() at kbdmux_intr+0x4d
kbdmux_kbd_intr() at kbdmux_kbd_intr+0x20
taskqueue_run() at taskqueue_run+0x135
ithread_loop() at ithread_loop+0x132
fork_exit() at fork_exit+0x87
fork_trampoline() at fork_trampoline+0xe
--- trap 0, rip = 0, rsp = 0xbf50ad00, rbp = 0 ---
db 

db show reg
cs 0x8
ss0x10
rax   0x26
rcx   0x10457a
rdx0x1
rbx  0
rsp 0xbf50aac0
rbp 0xbf50aad0
rsi 0x80c11000
rdi  0
r8 0xffe00
r9 0xa
r10 0xbf50a9e0
r110xa
r12 0x80957c20  main_softc
r13 0x809579c0  main_console
r140x2
r15  0
rip 0x803fd57f  kdb_enter+0x2f
rflags   0x286
dr0  0
dr1  0
dr2  0
dr3  0
dr4 0x0ff0
dr5  0x400
dr6 0x0ff0
dr7  0x400
kdb_enter+0x2f: nop 
db 

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


Re: Kernel hang on 6.x

2006-12-14 Thread R. Tyler Ballance


On Dec 14, 2006, at 1:05 PM, Brian Dean wrote:


Hi,

We're experiencing a kernel hang on a 6.x quad processor Sun amd64
based system.  We are able to reproduce it fairly reliably, but the
environment to do so is not easily replicatable so I cannot provide a
simple test case.  However, I have been able to build a debug kernel
and when the system hangs, I can break to the debugger prompt.  But
once there, I'm not sure what to do to isolate where the system is
hung up.  I have confirmed that the hang occurs in both SMP and
uniprocessor mode.  Here are some system details:



I think you'll need to ship this machine to my house for further  
umerm, diagnostics, yes, that's it ;)



On a more serious topic, can you paste the output from:


ddb show pcpu
ddballpcpu
ddbtraceall
ddbshow alllocks
ddbshow lockedvnods

Just curious as to whether those would show more info, because you're  
right, that trace is about as informative as new printer paper :)



Cheers

R. Tyler Ballance: Lead Mac Developer at bleep. software
contact: [EMAIL PROTECTED] | jabber: [EMAIL PROTECTED]


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


Re: [PATCH] automated make -j value

2006-12-14 Thread Garance A Drosehn

At 1:52 PM -0500 12/14/06, Kurt J. Lidl wrote:

On Wed, Dec 13, 2006, David O'Brien wrote:
  With multi-socket systems becoming more prevalent, and the continued

 increase in cores per processors, I thought it would be nice for
 'make -j' to gain some automation.

 Attached is a patch that makes -j- be the same as

  -j `sysctl -n kern.smp.cpus` and -j= be twice that.

I think you can do it better than this, by just support
setting the concurrancy level via reading a environmental
variable.  Like say NPROC, which is what CrayOS used, and
also appeared in the BSD/OS pmake varient several years ago.


You could have '-j-' use the value of NPROC if that variable is set, and
fall back to kern.smp.cpus if NPROC is not set.  (it also seems to me
this could be called -j auto instead of using some single-character
for it).

I think is not going to make much sense to have a special -j value
for twice ncpu as we get machines with 12 or 16 CPU's.  I doubt
there would be many projects which could really take advantage of 32
streams even if there was no performance penalties.  And for the few
which do exist, the users could just set NPROC if they think that
would do them any good.

--
Garance Alistair Drosehn =   [EMAIL PROTECTED]
Senior Systems Programmer   or   [EMAIL PROTECTED]
Rensselaer Polytechnic Institute; Troy, NY;  USA
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


VPN Agregation

2006-12-14 Thread just Maxim

Hello,
I have 7 ADSL connections, and one server outside with a big bandwidht.
I want to bond all 7 ADSL connection into one big channel.
I think it can be done using 7 VPN connections to the ourside server, and
after that to bond all this seve VPN connection into one big.
How can i do it with FreeBSD? Or other devices.



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


Syncing cpus on a multi-cpu, dual core system

2006-12-14 Thread M. L. Dodson
On a computational chemistry list I subscribe to there is a
current thread about multi-cpu systems needing to have the cpu
frequencies synced (this is in a Linux context).  This is
evidently not just having the cpus running at nominally the same
frequency but something else in addition.  A posting in the thread
said variations less than 0.1% were not problematic.  However, the
poster said it was an issue in a dual cpu, dual core system he had
set up.

My questions are:
1. Is this real or an urban legend?
2. If real, is this a Linuxism or is FreeBSD affected as well?
3. How do you sync the cpus, if it is needed?
4. anything else some one wants to expound on along this line.

Bud Dodson
-- 
M. L. Dodson
Email:  mldodson-at-houston-dot-rr-dot-com
Phone:  eight_three_two-56_three-386_one


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


Re: VPN Agregation

2006-12-14 Thread Julian Elischer

just Maxim wrote:

Hello,
I have 7 ADSL connections, and one server outside with a big bandwidht.
I want to bond all 7 ADSL connection into one big channel.
I think it can be done using 7 VPN connections to the ourside server, and
after that to bond all this seve VPN connection into one big.
How can i do it with FreeBSD? Or other devices.



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



how do you make different VPNs go out through different DSL lines?

more info is needed I guess.

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


Re: Syncing cpus on a multi-cpu, dual core system

2006-12-14 Thread soralx

 On a computational chemistry list I subscribe to there is a
 current thread about multi-cpu systems needing to have the cpu
 frequencies synced (this is in a Linux context).  This is
 evidently not just having the cpus running at nominally the same
 frequency but something else in addition.  A posting in the thread
 said variations less than 0.1% were not problematic.  However, the
 poster said it was an issue in a dual cpu, dual core system he had
 set up.
 
 My questions are:
 1. Is this real or an urban legend?

If CPUs use the same FSB (as is the case with dual-core chip), they are
already in sync. Right? For system that use multiple FSB clocks [like
dual-(dualcore-CPU) systems], it might be possible to vary the clocks
(as much as the manufacturer allows without hw modifications: e.g.,
SpeedStep, or something similar).

Why someone would want to have CPUs running at precisely the same
frequency is beyond my imagination.

 Bud Dodson

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


Re: VPN Agregation

2006-12-14 Thread Girish Venkatachalam
On Thu, Dec 14, 2006 at 08:36:51PM +, just Maxim wrote:
 Hello,
 I have 7 ADSL connections, and one server outside with a big bandwidht.
 I want to bond all 7 ADSL connection into one big channel.
 I think it can be done using 7 VPN connections to the ourside server, and
 after that to bond all this seve VPN connection into one big.
 How can i do it with FreeBSD? Or other devices.

I don't think VPN is the right way to go for channel bonding.

You only need to use MLPPP or BGP or some such thing.

It is a very simple thing to do. I have myself implemented link aggregation on 
wireless links by modifying only the downstream.

The other side just assembled the packets properly automatically.

I used a simple round robin scheme. The throughput was not constant but fairly 
good. I am sure it could be improved.

If you want link sharing both ways, then you got to do this at both sides.

Don't go the VPN way, you don't need the overhead for this. Besides it is 
totally unrelated to your goal.

Should you have more questions feel free to ask.

Best of luck!

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


Re: VPN Agregation

2006-12-14 Thread Simon Chang

Maxim,

VPN and channel aggregation are two completely unrelated concepts.  If
you want to do channel aggregation, you will also need networking
equipments (routers and switches) that are intelligent enough to
realize that you are treating seven physical lines as one virtual
line.  Otherwise, the frames and packets will not be switched/routed
to the correct interfaces, and you could even end up with switching
loops (and that is very bad).

Once you have aggregation set up, you should then consider VPN *only*
if you want the traffic between you and the server encrypted and
protected against tampering, etc.

I think that, in this case, not only do you need more information, you
also need a clearer idea of exactly what you want to do.

SC


On 12/14/06, just Maxim [EMAIL PROTECTED] wrote:

Hello,
I have 7 ADSL connections, and one server outside with a big bandwidht.
I want to bond all 7 ADSL connection into one big channel.
I think it can be done using 7 VPN connections to the ourside server, and
after that to bond all this seve VPN connection into one big.
How can i do it with FreeBSD? Or other devices.



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


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