Re: cron limit

2005-03-14 Thread Pieter de Boer

The script thats being ran by cron does a 'ps x |grep test.pl'.  and
prases the output from test.pl, but since cron is limiting the char
length, its not parsing the output right.
ps -xw ?
--
Pieter
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Global / Cluster / Shared filesystem for FreeBSD?

2005-03-14 Thread Ryan Sommers
Sean Kelly wrote:
Hope this helps. I'd like to see FreeBSD get much better AFS and general
clustering/internetworking support. For example, easier to configure LDAP
and Kerberos. Must.. compete.. with.. Active.. Directory...
This is something else I've been wanting to look at as well. In general 
I'd like to see many more file-systems supported in FreeBSD. Not as root 
devices, necessarily, but general kernel module support for them. I know 
someone was working on Reiser support, and I think that's great.

--
Ryan Sommers
[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: Idea about 'skeleton jail

2005-03-14 Thread Samuel J. Greear
On Sunday 13 March 2005 14:24, Anish Mistry wrote:
 On Sunday 13 March 2005 01:23 pm, Chris Hodgins wrote:
  Samuel J. Greear wrote:
   Not a bad 'idea' at all, although I won't comment on semantics.
   I had something implemented using fs stacking (in a very hackish
   way, and I believe it's lost now, so don't ask to see it...) to
   implement per-jail quota's that seemed to work quite well.
  
   Sam
 
  Feel free to comment on the semantics.  As I said before, I am not
  very knowledgable about filesystems and any insight or alternative
  implementation you can provide would be interesting I'm sure to
  everyone.

 Yeah, if there was jailfs that was setup automatically for the jails
 that supported quotas out of the box that would kill my major gripe
 about setting up jails.


Chris, your concept looks reasonable to me. I think I would probably do 
something along those lines but borrow some idea's from my
'jail-build' script.  It has the concept of both includes and excludes, but
it also handles another directory for what I call overrides.  My overrides
directories are per-jail and typically include nothing more than config.
files, but it works pretty handily.  The overrides may best be implemented in 
a seperate layer...  and I don't even know that I would call something like 
this a jailfs, more like a globfs or something...  I can see potential uses 
beyond jails.

The reasons that I never finished implementing my jailfs with quota
support were primarily, that stackable filesystems seem to be somewhat
of a black-art.  Secondarily, I concluded that the time would be better
spent implementing filesystem agnostic quota's in the vfs layer.  A
proper design should enable you to do a lot of fun things, I was thinking
something along the lines of just a simple aggregator that a module
could hand function pointers to and register interest in events, with
options like..  just-notify-me and dont-continue-without-my-approval.
Throw in some helpers for synchronizing module state to disk. The kernel
side of this shouldn't really be very hard, but all of the userland
quota utilities would need to be rewritten as they are tied to UFS at the
block level.  This all from about 3 years ago, and I haven't implemented
any of it.  I rock!

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


Re: Idea about 'skeleton jail

2005-03-14 Thread Anish Mistry
On Monday 14 March 2005 10:15 am, Samuel J. Greear wrote:
 On Sunday 13 March 2005 14:24, Anish Mistry wrote:
  On Sunday 13 March 2005 01:23 pm, Chris Hodgins wrote:
   Samuel J. Greear wrote:
Not a bad 'idea' at all, although I won't comment on
semantics. I had something implemented using fs stacking (in
a very hackish way, and I believe it's lost now, so don't ask
to see it...) to implement per-jail quota's that seemed to
work quite well.
   
Sam
  
   Feel free to comment on the semantics.  As I said before, I am
   not very knowledgable about filesystems and any insight or
   alternative implementation you can provide would be interesting
   I'm sure to everyone.
 
  Yeah, if there was jailfs that was setup automatically for the
  jails that supported quotas out of the box that would kill my
  major gripe about setting up jails.

 Chris, your concept looks reasonable to me. I think I would
 probably do something along those lines but borrow some idea's from
 my 'jail-build' script.  It has the concept of both includes and
 excludes, but it also handles another directory for what I call
 overrides.  My overrides directories are per-jail and typically
 include nothing more than config. files, but it works pretty
 handily.  The overrides may best be implemented in a seperate
 layer...  and I don't even know that I would call something like
 this a jailfs, more like a globfs or something...  I can see
 potential uses beyond jails.

 The reasons that I never finished implementing my jailfs with quota
 support were primarily, that stackable filesystems seem to be
 somewhat of a black-art.  Secondarily, I concluded that the time
 would be better spent implementing filesystem agnostic quota's in
 the vfs layer.  A proper design should enable you to do a lot of
 fun things, I was thinking something along the lines of just a
 simple aggregator that a module could hand function pointers to and
 register interest in events, with options like..  just-notify-me
 and dont-continue-without-my-approval. Throw in some helpers for
 synchronizing module state to disk. The kernel side of this
 shouldn't really be very hard, but all of the userland quota
 utilities would need to be rewritten as they are tied to UFS at the
 block level.  This all from about 3 years ago, and I haven't
 implemented any of it.  I rock!

 Sam
Would you be able to write up some design specs for getting all this 
done?  This might be a prime example of something to try to get 
funding for development.

-- 
Anish Mistry


pgpyd3VJETqb2.pgp
Description: PGP signature


Re: Idea about 'skeleton jail

2005-03-14 Thread Chris Hodgins
Anish Mistry wrote:
On Monday 14 March 2005 10:15 am, Samuel J. Greear wrote:
On Sunday 13 March 2005 14:24, Anish Mistry wrote:
On Sunday 13 March 2005 01:23 pm, Chris Hodgins wrote:
Samuel J. Greear wrote:
Not a bad 'idea' at all, although I won't comment on
semantics. I had something implemented using fs stacking (in
a very hackish way, and I believe it's lost now, so don't ask
to see it...) to implement per-jail quota's that seemed to
work quite well.
Sam
Feel free to comment on the semantics.  As I said before, I am
not very knowledgable about filesystems and any insight or
alternative implementation you can provide would be interesting
I'm sure to everyone.
Yeah, if there was jailfs that was setup automatically for the
jails that supported quotas out of the box that would kill my
major gripe about setting up jails.
Chris, your concept looks reasonable to me. I think I would
probably do something along those lines but borrow some idea's from
my 'jail-build' script.  It has the concept of both includes and
excludes, but it also handles another directory for what I call
overrides.  My overrides directories are per-jail and typically
include nothing more than config. files, but it works pretty
handily.  The overrides may best be implemented in a seperate
layer...  and I don't even know that I would call something like
this a jailfs, more like a globfs or something...  I can see
potential uses beyond jails.
I like the idea of the overrides directory.  That would work nicely.  If 
you made the overrides directory the actual jail root that might make 
sense.  Then when the [jail|glob]fs is mounted it will simply choose the 
file in the jail root directory instead of the one on the normal file 
system.

If we implemented a sort of copy of write architecture we could add to 
the exceptions list on the fly.  That is everything from the host 
(everything allowed by the config file that is) is available as a copy 
of the host system.  When you edit a file, the filesystem simply creates 
its own copy for the overrides directory and we edit that.  That would 
be very neat. Imagine that working on the ports system!! :)  What do you 
think?

The reasons that I never finished implementing my jailfs with quota
support were primarily, that stackable filesystems seem to be
somewhat of a black-art.  Secondarily, I concluded that the time
would be better spent implementing filesystem agnostic quota's in
the vfs layer.  A proper design should enable you to do a lot of
fun things, I was thinking something along the lines of just a
simple aggregator that a module could hand function pointers to and
register interest in events, with options like..  just-notify-me
and dont-continue-without-my-approval. Throw in some helpers for
synchronizing module state to disk. The kernel side of this
shouldn't really be very hard, but all of the userland quota
utilities would need to be rewritten as they are tied to UFS at the
block level.  This all from about 3 years ago, and I haven't
implemented any of it.  I rock!
Sounds, very interesting.
Sam
Would you be able to write up some design specs for getting all this 
done?  This might be a prime example of something to try to get 
funding for development.

I would be willing to donate some time to work on designing and building 
this.  Especially if working with someone who knows a lot more about 
filesystems than me. :)

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


Re: Idea about 'skeleton jail

2005-03-14 Thread Chris Hodgins
Anish Mistry wrote:
On Monday 14 March 2005 10:15 am, Samuel J. Greear wrote:
On Sunday 13 March 2005 14:24, Anish Mistry wrote:
On Sunday 13 March 2005 01:23 pm, Chris Hodgins wrote:
Samuel J. Greear wrote:
Not a bad 'idea' at all, although I won't comment on
semantics. I had something implemented using fs stacking (in
a very hackish way, and I believe it's lost now, so don't ask
to see it...) to implement per-jail quota's that seemed to
work quite well.
Sam
Feel free to comment on the semantics.  As I said before, I am
not very knowledgable about filesystems and any insight or
alternative implementation you can provide would be interesting
I'm sure to everyone.
Yeah, if there was jailfs that was setup automatically for the
jails that supported quotas out of the box that would kill my
major gripe about setting up jails.
Chris, your concept looks reasonable to me. I think I would
probably do something along those lines but borrow some idea's from
my 'jail-build' script.  It has the concept of both includes and
excludes, but it also handles another directory for what I call
overrides.  My overrides directories are per-jail and typically
include nothing more than config. files, but it works pretty
handily.  The overrides may best be implemented in a seperate
layer...  and I don't even know that I would call something like
this a jailfs, more like a globfs or something...  I can see
potential uses beyond jails.
The reasons that I never finished implementing my jailfs with quota
support were primarily, that stackable filesystems seem to be
somewhat of a black-art.  Secondarily, I concluded that the time
would be better spent implementing filesystem agnostic quota's in
the vfs layer.  A proper design should enable you to do a lot of
fun things, I was thinking something along the lines of just a
simple aggregator that a module could hand function pointers to and
register interest in events, with options like..  just-notify-me
and dont-continue-without-my-approval. Throw in some helpers for
synchronizing module state to disk. The kernel side of this
shouldn't really be very hard, but all of the userland quota
utilities would need to be rewritten as they are tied to UFS at the
block level.  This all from about 3 years ago, and I haven't
implemented any of it.  I rock!
Sam
Would you be able to write up some design specs for getting all this 
done?  This might be a prime example of something to try to get 
funding for development.

I seem to have stopped receiving mail from the mailing lists.  Would it 
be possible for someone to forward any replies on this thread for the 
last few hours to [EMAIL PROTECTED]  If it would be 
possible for any further emails to be cc'd there as well that would be 
brilliant. :)

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


memory leak in inflate.c

2005-03-14 Thread Vijay.Singh
Hi, I am trying to debug a memory leak in executing gzipped binaries when the 
parameter list is too long. The function in question is inflate_dynamic(). 

/* decompress until an end-of-block code */
if (inflate_codes(glbl, tl, td, bl, bd))
return 1;

/* free the decoding tables, return */
huft_free(glbl, tl);
huft_free(glbl, td);
return 0;


Should this be re-written as:

i = inflate_codes(glbl, tl, td, bl, bd) ? 1 : 0;

/* free the decoding tables, return */
huft_free(glbl, tl);
huft_free(glbl, td);

return (i);

so that the Huffman tables are always freed.

Comments appreciated.

br
vijay


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


Re: Freebsd 5.3 problem

2005-03-14 Thread Amandeep Pannu

HI all,

I am running FreeBSd 5.3-REL

Today my system simply locked up.  There was no error sent to console, to
any logs, nor the monitor screen.  It was totally unresponsive to network,
serial console, or keyboard.  After 4 power-cycles, we were unable to get
past the BIOS as it was reporting RAM R/W error.  I have a screen shot
of this from the serial port console, but it is the same as the one from
before.  If I hit the F1
key to continue, FreeBSD seemingly reports

  ACPI-0277: *** Warning: Invalid checksum in table [APIC] (98, sum
84 is not zero)

just before booting.  It is after the boot screen, but before the
copyright is displayed by the kernel.

Finally, I turned the machine off for about 2 minutes, then turned it back
on.  It was able to get through the BIOS RAM test and reboot cleanly, and
the file systems cleaned themselves up and the database did so as well,
and it appears to be running fine.


Any ideas what is going on.
Thanks
A

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


Re: Freebsd 5.3 problem

2005-03-14 Thread Kris Kennaway
On Mon, Mar 14, 2005 at 12:23:59PM -0800, Amandeep Pannu wrote:
 
 HI all,
 
 I am running FreeBSd 5.3-REL
 
 Today my system simply locked up.  There was no error sent to console, to
 any logs, nor the monitor screen.  It was totally unresponsive to network,
 serial console, or keyboard.  After 4 power-cycles, we were unable to get
 past the BIOS as it was reporting RAM R/W error.  I have a screen shot
 of this from the serial port console, but it is the same as the one from
 before.  If I hit the F1

Looks like hardware failure.

Kris

--
In God we Trust -- all others must submit an X.509 certificate.
-- Charles Forsythe [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: Freebsd 5.3 problem

2005-03-14 Thread Amandeep Pannu
Hi Kris,

I had this problem before and I changed the MB and the memory and today it
did the same thing it did before.
memtest doesnt give any errors.

Thanks
A


 On Mon, Mar 14, 2005 at 12:23:59PM -0800, Amandeep Pannu wrote:

 HI all,

 I am running FreeBSd 5.3-REL

 Today my system simply locked up.  There was no error sent to console,
 to
 any logs, nor the monitor screen.  It was totally unresponsive to
 network,
 serial console, or keyboard.  After 4 power-cycles, we were unable to
 get
 past the BIOS as it was reporting RAM R/W error.  I have a screen shot
 of this from the serial port console, but it is the same as the one from
 before.  If I hit the F1

 Looks like hardware failure.

 Kris

 --
 In God we Trust -- all others must submit an X.509 certificate.
 -- Charles Forsythe [EMAIL PROTECTED]
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to [EMAIL PROTECTED]



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


Re: Freebsd 5.3 problem

2005-03-14 Thread Kris Kennaway
On Mon, Mar 14, 2005 at 12:34:59PM -0800, Amandeep Pannu wrote:
 Hi Kris,
 
 I had this problem before and I changed the MB and the memory and today it
 did the same thing it did before.

Continue to check power supply, CPU cooling, cabling, etc.

 memtest doesnt give any errors.

OK, that doesn't prove they don't exist though.

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


Re: memory leak in inflate.c

2005-03-14 Thread Marco Molteni
On Mon, 14 Mar 2005 [EMAIL PROTECTED] wrote:

 Hi, I am trying to debug a memory leak in executing gzipped binaries
 when the parameter list is too long. The function in question is
 inflate_dynamic(). 
 
 /* decompress until an end-of-block code */
 if (inflate_codes(glbl, tl, td, bl, bd))
 return 1;
 
 /* free the decoding tables, return */
 huft_free(glbl, tl);
 huft_free(glbl, td);
 return 0;
 
 
 Should this be re-written as:
 
   i = inflate_codes(glbl, tl, td, bl, bd) ? 1 : 0;
 
   /* free the decoding tables, return */
   huft_free(glbl, tl);
   huft_free(glbl, td);
 
   return (i);
 
 so that the Huffman tables are always freed.

_If_ I remember correctly, if inflate_dynamic() returns a non-zero
code it means that the decompression failed and the program itself
quits right away, no memory leak. Or am I missing something?

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


Re: Idea about 'skeleton jail

2005-03-14 Thread Chris Hodgins
Not sure if this has already made it to the mailing list or not.  My
uni email account has started blocking email inbound and outbound to
the freebsd servers.  If I have missed anything since the post I am
replying to I would appreciate if it could be forwarded on to me at
this address...thanks :)  A few more comments below. :)

Anish Mistry wrote:
 On Monday 14 March 2005 10:15 am, Samuel J. Greear wrote:

On Sunday 13 March 2005 14:24, Anish Mistry wrote:

On Sunday 13 March 2005 01:23 pm, Chris Hodgins wrote:

Samuel J. Greear wrote:

Not a bad 'idea' at all, although I won't comment on
semantics. I had something implemented using fs stacking (in
a very hackish way, and I believe it's lost now, so don't ask
to see it...) to implement per-jail quota's that seemed to
work quite well.

Sam

Feel free to comment on the semantics.  As I said before, I am
not very knowledgable about filesystems and any insight or
alternative implementation you can provide would be interesting
I'm sure to everyone.

Yeah, if there was jailfs that was setup automatically for the
jails that supported quotas out of the box that would kill my
major gripe about setting up jails.

Chris, your concept looks reasonable to me. I think I would
probably do something along those lines but borrow some idea's from
my 'jail-build' script.  It has the concept of both includes and
excludes, but it also handles another directory for what I call
overrides.  My overrides directories are per-jail and typically
include nothing more than config. files, but it works pretty
handily.  The overrides may best be implemented in a seperate
layer...  and I don't even know that I would call something like
this a jailfs, more like a globfs or something...  I can see
potential uses beyond jails.


I like the idea of the overrides directory.  That would work nicely.  If
you made the overrides directory the actual jail root that might make
sense.  Then when the [jail|glob]fs is mounted it will simply choose the
file in the jail root directory instead of the one on the normal file
system.

If we implemented a sort of copy of write architecture we could add to
the exceptions list on the fly.  That is everything from the host
(everything allowed by the config file that is) is available as a copy
of the host system.  When you edit a file, the filesystem simply creates
its own copy for the overrides directory and we edit that.  That would
be very neat. Imagine that working on the ports system!! :)  What do you
think?

The reasons that I never finished implementing my jailfs with quota
support were primarily, that stackable filesystems seem to be
somewhat of a black-art.  Secondarily, I concluded that the time
would be better spent implementing filesystem agnostic quota's in
the vfs layer.  A proper design should enable you to do a lot of
fun things, I was thinking something along the lines of just a
simple aggregator that a module could hand function pointers to and
register interest in events, with options like..  just-notify-me
and dont-continue-without-my-approval. Throw in some helpers for
synchronizing module state to disk. The kernel side of this
shouldn't really be very hard, but all of the userland quota
utilities would need to be rewritten as they are tied to UFS at the
block level.  This all from about 3 years ago, and I haven't
implemented any of it.  I rock!

Sounds, very interesting.


Sam

 Would you be able to write up some design specs for getting all this
 done?  This might be a prime example of something to try to get
 funding for development.


I would be willing to donate some time to work on designing and building
this.  Especially if working with someone who knows a lot more about
filesystems than me. :)

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


Re: Freebsd 5.3 problem

2005-03-14 Thread Jason Henson
On 03/14/05 15:34:59, Amandeep Pannu wrote:
Hi Kris,
I had this problem before and I changed the MB and the memory and
today it
did the same thing it did before.
memtest doesnt give any errors.
Thanks
A

Memtest86 right?  There is another that you run in an os like any other  
program.  Did you leave memtest86 running over night or the weekend?   
How are your temps under load?  Do you use a ups?


 On Mon, Mar 14, 2005 at 12:23:59PM -0800, Amandeep Pannu wrote:

 HI all,

 I am running FreeBSd 5.3-REL

 Today my system simply locked up.  There was no error sent to
console,
 to
 any logs, nor the monitor screen.  It was totally unresponsive to
 network,
 serial console, or keyboard.  After 4 power-cycles, we were unable
to
 get
 past the BIOS as it was reporting RAM R/W error.  I have a  
screen
shot
 of this from the serial port console, but it is the same as the  
one
from
 before.  If I hit the F1

 Looks like hardware failure.

 Kris

 --
 In God we Trust -- all others must submit an X.509 certificate.
 -- Charles Forsythe [EMAIL PROTECTED]
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers- 
[EMAIL PROTECTED]


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




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


cvsup can't work

2005-03-14 Thread wanakahalugi
hi all,

I installed FreeBSD5.3REL on my PC, and I want to update the source
tree and ports collection using cvsup.
To do that I copy the stable-supfile to /etc directory and set its
default host tag to the nearest mirror, and also set only the ports
that I want to update to save bandwith.
Everything is work fine except when I run the command # cvsup
/etc/stable-supfile the response from the mirror server is like this :

[EMAIL PROTECTED] root]# cvsup /etc/stable-supfile
Cannot connect to cvsup.id.FreeBSD.org: Connection refused 
Will retry at 09:31:28

I use netstat to look what happen inside those error message, and I
found this one :

[EMAIL PROTECTED] cakra]$ netstat   

Active Internet connections   
Proto Recv-Q Send-Q  Local Address  Foreign Address(state)
tcp4   0  0  192.100.40.14.53875mirror.cbn.net.i.cvsup SYN_SENT   

The PC never ESTABLISHED the connection to the server it's only do the
SYN_SENT. Why it happen? Is cvsup using certain ports so I can make
some proper change on my firewall?
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: cvsup can't work

2005-03-14 Thread Michael C. Shultz
On Monday 14 March 2005 06:33 pm, wanakahalugi wrote:
 hi all,

 I installed FreeBSD5.3REL on my PC, and I want to update the source
 tree and ports collection using cvsup.
 To do that I copy the stable-supfile to /etc directory and set its
 default host tag to the nearest mirror, and also set only the ports
 that I want to update to save bandwith.
 Everything is work fine except when I run the command # cvsup
 /etc/stable-supfile the response from the mirror server is like this
 :

 [EMAIL PROTECTED] root]# cvsup /etc/stable-supfile
 Cannot connect to cvsup.id.FreeBSD.org: Connection refused
 Will retry at 09:31:28

 I use netstat to look what happen inside those error message, and I
 found this one :

 [EMAIL PROTECTED] cakra]$ netstat
 Active Internet connections
 Proto Recv-Q Send-Q  Local Address  Foreign Address   
 (state) tcp4   0  0  192.100.40.14.53875   
 mirror.cbn.net.i.cvsup SYN_SENT

 The PC never ESTABLISHED the connection to the server it's only do
 the SYN_SENT. Why it happen? Is cvsup using certain ports so I can
 make some proper change on my firewall?
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to
 [EMAIL PROTECTED]

It uses port 5999 see /etc/services

-Mike

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


poll or select for ppi?

2005-03-14 Thread Matt Kory
Is it possible to use poll or select to detect a change in the status
bits of the parallel port?  I tried something like this, and took bits
5 and 6 of the status register low and nothing seemed to happen.  Is
what I am trying to do even possible, or I am supposed to take a
certain bit low to cause a read event?  Any help is appreciated.

int ppi_fd;
char port[] = /dev/ppi0;
ppi_fd = open(port, O_RDWR);

fd_set rfds;
struct timeval tv;
tv.tv_sec = 0;
tv.tv_usec = 10;

while(1) {
FD_ZERO( rfds );
FD_SET( ppi_fd, rfds );
if ( select(1, rfds, NULL, NULL, tv) ) {
 printf(hi\n);
 }
}
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: poll or select for ppi?

2005-03-14 Thread Daniel O'Connor
On Tue, 15 Mar 2005 13:35, Matt Kory wrote:
 Is it possible to use poll or select to detect a change in the status
 bits of the parallel port?  I tried something like this, and took bits
 5 and 6 of the status register low and nothing seemed to happen.  Is
 what I am trying to do even possible, or I am supposed to take a
 certain bit low to cause a read event?  Any help is appreciated.

PPI doesn't support select/poll.

I don't think ere is any support for interrupt based notifications.. The only 
thing interrupts appear to be used for is for IEE1284 state changes.

ie you're stuck with polling :(

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
The nice thing about standards is that there
are so many of them to choose from.
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C


pgpd8dWRD2quR.pgp
Description: PGP signature


Re: poll or select for ppi?

2005-03-14 Thread Bruce M Simpson
On Mon, Mar 14, 2005 at 10:05:34PM -0500, Matt Kory wrote:
 Is it possible to use poll or select to detect a change in the status
 bits of the parallel port?  I tried something like this, and took bits
 5 and 6 of the status register low and nothing seemed to happen.  Is
 what I am trying to do even possible, or I am supposed to take a
 certain bit low to cause a read event?  Any help is appreciated.

Disclaimer: I'm no expert on the parallel port.

The man page for ppi(4) says that all I/O is via ioctl(), which isn't
covered by the select() mechanism.

You'd either have to poll PPIGSTATUS from userland on a timer, or perhaps
hack the driver to use a kevent. Considering there's probably no way to
get a hardware interrupt for the status change directly via ppi(4), you
might need to consider writing a set of custom ppbus microsequences and
a driver for your application.

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


threads question

2005-03-14 Thread Michael C. Shultz
Hi, I've just reached a point in a program I'm writing where I'd like to 
do threading.

When I try to start a thread like this:

pthread_create(thread, attr, MGPMrUpgrade, property );

where property is a structure of many variables it doesn't get passed
to the function.  If I do this:

pthread_create(thread, attr, MGPMrUpgrade( property ), NULL );

It works, but just seems wrong.

Can anyone point me to a source file, preferably in /usr/src somewhere
that passes a structure to a function being run as a thread so I may 
study the proper way to do this?

Thank you.

-Mike
 

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


Re: threads question

2005-03-14 Thread Daniel Eischen
On Mon, 14 Mar 2005, Michael C. Shultz wrote:

 Hi, I've just reached a point in a program I'm writing where I'd like to
 do threading.

 When I try to start a thread like this:

 pthread_create(thread, attr, MGPMrUpgrade, property );
     property

You should compile with -Wall and get rid of any warnings.

 where property is a structure of many variables it doesn't get passed
 to the function.  If I do this:

 pthread_create(thread, attr, MGPMrUpgrade( property ), NULL );

That looks like it will actuall call MGPMrUpgrade() and use its
return value as the function pointer.

 It works, but just seems wrong.

 Can anyone point me to a source file, preferably in /usr/src somewhere
 that passes a structure to a function being run as a thread so I may
 study the proper way to do this?

  src/lib/libpthread/test/sem_d.c
  src/lib/libpthread/test/mutex_d.c
  src/lib/libpthread/test/sigwait_d.c

I'd suggest getting Butenhof's Programming with POSIX Threads book.

-- 
DE

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


Re: threads question

2005-03-14 Thread Michael C. Shultz
On Monday 14 March 2005 08:57 pm, Daniel Eischen wrote:
 On Mon, 14 Mar 2005, Michael C. Shultz wrote:
  Hi, I've just reached a point in a program I'm writing where I'd
  like to do threading.
 
  When I try to start a thread like this:
 
  pthread_create(thread, attr, MGPMrUpgrade, property );

  property

 You should compile with -Wall and get rid of any warnings.

  where property is a structure of many variables it doesn't get
  passed to the function.  If I do this:
 
  pthread_create(thread, attr, MGPMrUpgrade( property ), NULL );

 That looks like it will actuall call MGPMrUpgrade() and use its
 return value as the function pointer.

  It works, but just seems wrong.
 
  Can anyone point me to a source file, preferably in /usr/src
  somewhere that passes a structure to a function being run as a
  thread so I may study the proper way to do this?

   src/lib/libpthread/test/sem_d.c
   src/lib/libpthread/test/mutex_d.c
   src/lib/libpthread/test/sigwait_d.c

Great!

 I'd suggest getting Butenhof's Programming with POSIX Threads book.

I did a google on Programming with POSIX Threads and this site popped 
up first.  I remember this guy's stuff from way back when on signals I 
think, it was great for a beginner so maybe this one is worth looking 
at too.
 
http://users.actcom.co.il/~choo/lupg/tutorials/multi-thread/multi-thread.html;

I found the book at Amazon, thanks for the tip!

Many thanks!

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