Re: cvs up, no space left in /tmp

2007-08-09 Thread Mackan

On Aug 9, 2007, at 9:46 PM, Jim Razmus wrote:


* Mackan <[EMAIL PROTECTED]> [070809 14:13]:

Hi,

# cd /usr/src && cvs -q up -rOPENBSD_4_1 -Pd
can't create temporary directory /tmp/cvs-serv19063
No space left on device




I think that is an issue on the server.

Here's an alternative that eases the burden on the server and  
speeds up

your local operations.  Try using cvsync to get and maintain your own
copy of the repository.  Then do your cvs co and cvs up operations
against it.

If your sending back patches based on changes in your cvs tree,  
just be

sure to #> cvs -d [EMAIL PROTECTED]:/cvs diff  to create
your patches.

HTH,
Jim



Thanks, I never thought of that the "no space left" message was from the
server side. It isn't obvious.

Mackan



cvs up, no space left in /tmp

2007-08-09 Thread Mackan

Hi,

For many months, I've had this in root's crontab:

# update src tree
0   4   *   *   *   cd /usr/src && cvs -q up - 
rOPENBSD_4_1 -Pd


with no problem. For about a week now I get mail from cron about no  
space left on device.

I need some advise on how to find whats wrong.


# dmesg
OpenBSD 4.1-stable (GENERIC) #0: Sat Jun  9 12:54:39 CEST 2007
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
[...]
real mem  = 1064857600 (1039900K)
avail mem = 964227072 (941628K)
using 4278 buffers containing 53366784 bytes (52116K) of memory

# cd /usr/src && cvs -q up -rOPENBSD_4_1 -Pd
can't create temporary directory /tmp/cvs-serv19063
No space left on device

# df -hi
Filesystem SizeUsed   Avail Capacity iused   ifree  %iused   
Mounted on

/dev/wd0a  147M   37.7M102M27%2208   1699012%   /
/dev/wd0d  148M104K140M 0%  14   19312 0%   /tmp
/dev/wd0e 1006M405M551M42%   13289  130965 9%   /usr
/dev/wd0i 1006M   59.6M896M 6%2874  141380 2%   / 
usr/local
/dev/wd0g  2.0G9.3M1.9G 0%1733  266169 1%   / 
usr/obj
/dev/wd0h  2.0G194M1.7G10%   81258  18664430%   / 
usr/ports
/dev/wd0f  2.0G630M1.3G33%   78418  18948429%   / 
usr/src

/dev/wd0j  4.9G787M3.9G16%4819  654635 1%   /var
/dev/wd0k  214G5.3G198G 3%   58249 28401397 0%   / 
var/www/users




Re: Restart Apache with clean enviroment

2007-06-16 Thread Mackan

On 6/16/07, Mackan <[EMAIL PROTECTED]> wrote:

Hi list!

How do you guys restart apache (apachectl stop / start) without
having all the current shell variables show up in phpinfo() that
is exported in the shell?

Mackan


On Jun 16, 2007, at 1:59 PM, Almir Karic wrote:

env -i is your friend.
--
almir


Perfect, thank you!

Mackan



Restart Apache with clean enviroment

2007-06-16 Thread Mackan

Hi list!

How do you guys restart apache (apachectl stop / start) without
having all the current shell variables show up in phpinfo() that
is exported in the shell?

Mackan



Re: Rotate many Apache logfiles

2006-09-15 Thread Mackan

On 15 sep 2006, at 18.57, Garance A Drosihn wrote:


At 2:57 PM +0200 9/15/06, Mackan wrote:

Hi!

What is the preferred way of rotating Apache's logfiles?

I have many virtual domains, each with its own access and error  
logfile.

I'm using CustomLog, not TransferLog.  Apache is chrooted.

Adding every logfile to /etc/newsyslog.conf is one way, but hard to
maintain.  Is Apache's own rotatelogs program the way to go?


Fwiw, the version of newsyslog in FreeBSD supports pattern-matching
on the logfile names.  However, it may not have some features that
are in the version of newsyslog that comes with OpenBSD.


Ok.


If you don't want to pull that in, then maybe setup a separate
newsyslog.conf file (and a second cronjob for it).  That way it should
be easier to use a shell script to create the appropriate entries for
that conf file, without worrying that you're going to clobber any of
the standard system entries.


This is exactly what I plan to do.  I don't want to bring in too many
ports and 3rd party stuff.

Thank you, and all other nice ppl on the list, for your replies.

Mackan



Rotate many Apache logfiles

2006-09-15 Thread Mackan

Hi!

What is the preferred way of rotating Apache's logfiles?

I have many virtual domains, each with its own access and error logfile.
I'm using CustomLog, not TransferLog.  Apache is chrooted.

Adding every logfile to /etc/newsyslog.conf is one way, but hard to
maintain.  Is Apache's own rotatelogs program the way to go?


Mackan



Re: Too many open files in system, /bsd: file: table is full

2006-08-28 Thread Mackan

On 27 aug 2006, at 17.38, Stuart Henderson wrote:

On 2006/08/27 17:09, Mackan wrote:

I did "sysctl -w kern.maxfiles=1" to  increase the value from
1772 to 1, and put the same value in /etc/sysctl.conf


Keep an eye on kern.nfiles, if it's higher than expected ...


It varies, mostly between 400-700. I guess it hit the limit at
some peak.





And is 1 a too high value?


Depends, again.



I'll go with 1.  Just curious whether something bad could happen
with a limit set too high.

Thanks,

Mackan



Too many open files in system, /bsd: file: table is full

2006-08-27 Thread Mackan

Hi!

I got a few "Postmaster notify" from Sendmail, telling me there was
"mail.local: /var/mail/many: Too many open files in system" and also
a few with "mail: can't load library 'libc.so.39.0'".

/var/log/messages told me:
Aug 27 16:00:01 blowfish /bsd: file: table is full
Aug 27 16:00:01 blowfish last message repeated 19 times
Aug 27 16:02:11 blowfish last message repeated 4 times
Aug 27 16:07:14 blowfish last message repeated 128 times

So, I made some googling, and found a few similar cases, and someone  
suggested
changing the kern.maxfiles.  I did "sysctl -w kern.maxfiles=1" to  
increase

the value from 1772 to 1, and put the same value in /etc/sysctl.conf

This is a GENERIC 3.9 install, on an i386 P4 1GB ram machine, running  
Sendmail,
Apache, MySQL, Samba.  I have a few scripts in crontab collecting  
SNMP data
from my router to MRTG, besides that this is a low traffic server,  
with few users

and a few websites.

I think 1772 files seems to be too low as default. Is it?
And is 1 a too high value?


Mackan



Need help with dns/pf/tcpdump

2006-07-24 Thread Mackan

Hi!

Need help to understand dns/pf/tcpdump. See below.

ns.foo.bar is a dns slave that makes AXFR zone transfer from my  
server (mybox). Why is the traffic
blocked on the first lines? What kind of traffic is that? Perhaps I  
don't understand DNS fully,
but I thought zone transfers were made using TCP only, and ordinary  
queries UDP.


Here's the relevant part of my pf config:

$ext_if = "bge0"

rule 18) pass in log quick on $ext_if inet proto tcp from  
 to any port = domain
rule 19) pass in log quick on $ext_if inet proto udp from  
 to any port = domain


rule 21) block return in log on $ext_if all

# tcpdump -a -e -o -ttt -i pflog0
Jul 24 05:34:15.090025 rule 21/(match) block in on bge0: ns.foo.bar. 
55009 > mybox.domain: [|domain] (DF)
Jul 24 05:34:19.089201 rule 21/(match) block in on bge0: ns.foo.bar. 
55009 > mybox.domain: [|domain] (DF)
Jul 24 05:34:27.090143 rule 21/(match) block in on bge0: ns.foo.bar. 
55009 > mybox.domain: [|domain] (DF)
Jul 24 05:34:43.107922 rule 18/(match) pass in on bge0: ns.foo.bar. 
43646 > mybox.domain: [|tcp] (DF)
Jul 24 05:34:46.101496 rule 18/(match) pass in on bge0: ns.foo.bar. 
43646 > mybox.domain: [|tcp] (DF)
Jul 24 05:34:52.101598 rule 18/(match) pass in on bge0: ns.foo.bar. 
43646 > mybox.domain: [|tcp] (DF)
Jul 24 05:35:04.102286 rule 18/(match) pass in on bge0: ns.foo.bar. 
43646 > mybox.domain: [|tcp] (DF)
Jul 24 05:35:28.102625 rule 18/(match) pass in on bge0: ns.foo.bar. 
43646 > mybox.domain: [|tcp] (DF)


No transfers were actually made this time, I guess the slaves just  
checking in and compares
serial number of zones. But transfers do work according to logfiles  
from named.



Anybody? :-)

Mackan



Re: Make pf reload ruleset whenever a new file appears/changes

2006-07-18 Thread Mackan
Martin Schrvder wrote:
> 2006/7/18, Mackan <[EMAIL PROTECTED]>:
>> 4) same php script generates a new ruleset for pf
>> 5) pf detect changes and reload new ruleset
>>
>> Step 1 - 4 is already done.  I need help with step 5.
>
> You know pfctl(8)?

Yes. But how do I make apache/php execute the pfctl program
or signal to pfctl ro reload?

Apache is chroot and run by www, and pfctl lives outside
chroot and must be run as root.

I can't see your point - perhaps I'm missing something here.

Mackan



Make pf reload ruleset whenever a new file appears/changes

2006-07-18 Thread Mackan
Hi list!

(Warning: poor english ahead!)

This is what I need to do:

1) a user authenticates and enters my website
2) the user enters one IP-address into a form and submit it.
3) php script receive this address and save it in a file or database.
4) same php script generates a new ruleset for pf
5) pf detect changes and reload new ruleset

Step 1 - 4 is already done.  I need help with step 5.

Apache is chroot.  I could have a cron job search for a new file
every five minutes or so, but that feels like an ugly solution.

Is there any better way to signal pf to reload the new ruleset
whenever a user submits a new IP-adress?

Odd question perhaps... :-)


Mackan



Re: UTF-8 text editor

2006-07-10 Thread Mackan

On 10 jul 2006, at 21.54, Will H. Backman wrote:


Mackan wrote:


I just "upgraded" my server OS from Debian/Linux to OpenBSD. But  
it seems
that in the case of Unicode-aware applications I made a big  
"downgrade".


I really want I simple editor with unicode, for myself and my users.


Mackan

What was lacking from Debian/Linux that made you decide to switch  
to OpenBSD?


Nothing at all.  Debian/Linux is a very functional and feature-rich OS.
But I like OpenBSD because of its clean design, and being a more  
UNIX'ish OS.
I decided to use it for my new server.  Everything currently running  
on the old
Debian box is now running on the new OpenBSD box.  And If I could  
find a working

utf-8 console editor everything would be perfect!

Perhaps "upgrade" was the wrong word to use.


Mackan



Re: UTF-8 text editor

2006-07-10 Thread Mackan

On 10 jul 2006, at 20.43, Spruell, Darren-Perot wrote:


From: [EMAIL PROTECTED]

Is there any UTF-8-aware text editor (for terminal use) available
for OpenBSD? Vi(m) and similar is out of question for me, I never
learned those.


As ubiquitous as vi is on Unix, it seems a shallow reason.

Really, it takes all of 15 minutes to pick up what you need for vi/ 
vim.
Install a copy somewhere and spend a few minutes on vimtutor and  
you should

find it pretty straightforward.

DS


You are probably right about that. We'll see.

I just "upgraded" my server OS from Debian/Linux to OpenBSD. But it  
seems

that in the case of Unicode-aware applications I made a big "downgrade".

I really want I simple editor with unicode, for myself and my users.


Mackan



UTF-8 text editor

2006-07-10 Thread Mackan

Hi list!

Is there any UTF-8-aware text editor (for terminal use) available
for OpenBSD? Vi(m) and similar is out of question for me, I never
learned those.

I tried to compile latest nano from CVS, which support UTF-8, but
with no luck. I get configure errors saying that my curses don't
support unicode.

Using 3.9/i386 with GENERIC.

Suggestions anyone?

Thanks,

Mackan