Re: putty or ssh, screen $cmd
Nick Holland wrote: > On 05/27/11 14:53, Helmut Schneider wrote: > > [Problem with screen] [...] > http://www.openbsd.org/faq/faq7.html#tmux > man tmux [...] Thanks for all replies (also by pm), tmux indeed looks promissing. Helmut
putty or ssh, screen $cmd
Hi, I'd like to supply a command to screen. Unfortunatly when using putty or ssh nothing seems to happen: [helmut@OBSDHelmut ~]$ screen ls -la [screen is terminating] [helmut@OBSDHelmut ~]$ [helmut@BSDHelmut ~]$ ssh -t obsdhelmut screen ls -la Enter passphrase for key '/home/helmut/.ssh/id_dsa': [screen is terminating] Connection to obsdhelmut closed. [helmut@BSDHelmut ~]$ When doing this on a console it works fine. Doing the same on FreeBSD or Linux using putty or ssh also works fine. Any setting I need to provide e.g. at /etc/screenrc? [helmut@OBSDHelmut ~]$ uname -rs OpenBSD 4.9 [helmut@OBSDHelmut ~]$ screen -v Screen version 4.00.03 (FAU) 23-Oct-06 [helmut@OBSDHelmut ~]$ Thanks, Helmut
Check for port updates
Hi, what is the preferred way to check for port updates? In the past I used /usr/ports/infrastructure/build/out-of-date but that "always-update"-thing I couldn't find much information about in the net is somehow confusing and not really helpful when trying to automate checking for updates. # /usr/ports/infrastructure/build/out-of-date Collecting installed packages: ok Collecting port versions: ok Collecting port signatures: ok Outdated ports: devel/quirks # always-update -> quirks-1.32 # Thanks, Helmut
Re: It is 2010. Still no >3GB support by default?
Jason Beaudoin wrote: > On Mon, Jun 7, 2010 at 2:52 PM, Dexter Tomisson > wrote: > > I'd really, really like to know what's the matter with a larger > > memory support? > > > > Why is 'bigmem' still not default? What faults/bugs does it still > > has? > > > > What do you need to make it ok? Do you need a hardware donation to > > make that better, > > do you need few bucks, do you need a good coder to improve that, or > > again some license problems perhaps?, > > what's the problem, share with us please, I'd really like to help > > with everything i can. > > > > I hope, maybe someday, our beloved Puffy will catch up to the 21st > > century. > > maybe I haven't been on this list long enoug.. but it seems like 2010 > has been the year of the troll, first update to the chinese calander > in ages.. If [1] is correct and I fully understood it I counted 12 trolls and only one single person being able to answer OPs question. And it took him only one single URI. Indeed, 2010 seems the year of the troll. [1] http://en.wikipedia.org/wiki/Troll_%28Internet%29 -- No Swen today, my love has gone away My mailbox stands for lorn, a symbol of the dawn
Re: Adding a route for chrooted Apache/PHP
Gilles Chehade wrote: > the problem is not about having a "route added to the chroot" but > rather about having the resolver (hint: there's a hint in what I just > wrote) know how to do its work. > > > So I've added the file /var/www/etc/hosts: > > > > > > 127.0.0.1 localhost > > > 94.100.188.5appsmail.ru www.appsmail.ru > > > > > > And also have changed this line in /var/www/conf/php.ini: > > > > > > allow_url_fopen = On > > > > > > Unfortunately I still get the error: > > > > > > Warning: file_get_contents(http://94.100.188.5/robots.txt) So either the OP configured his script to use the IP rather than the host name or apache resolves fine. In both cases the problem seems not the resolver. Or did I miss something? Helmut -- No Swen today, my love has gone away My mailbox stands for lorn, a symbol of the dawn
Re: Adding a route for chrooted Apache/PHP
Alexander Farber wrote: > I'm a longtime happy user of OpenBSD + stock Apache + > PHP (from packages), but now I have to send a HTTP GET > request from one of my scripts to one host (to appsmail.ru). > > So I've added the file /var/www/etc/hosts: > > 127.0.0.1 localhost > 94.100.188.5appsmail.ru www.appsmail.ru > > And also have changed this line in /var/www/conf/php.ini: > > allow_url_fopen = On > > Unfortunately I still get the error: > > Warning: file_get_contents(http://94.100.188.5/robots.txt) > [function.file-get-contents]: failed to open stream: No route to host > in /htdocs/mailru/index.php on line 18 Apache is chroot'ed but not jailed (the process is restricted only within the file system). I guess there are missing php modules within the chroot. What is line 18? Helmut -- No Swen today, my love has gone away My mailbox stands for lorn, a symbol of the dawn
Re: windows 7 multiboot
Marc Espie wrote: > On Mon, Apr 26, 2010 at 02:34:44PM +0200, Marc Espie wrote: > > A new laptop has been ordered, and I shoul have enough left for a > > bit more power (expect new dpb thingies). > > So I got the new laptop, and I'm playing a bit with it. > One pleasant surprise is... windows7. Apparently, it includes tools > that allow it to shrink the NTFS partition on the fly (yes, I'm > keeping a windows partition around). Not only shrink but also expand. But no "move". -- No Swen today, my love has gone away My mailbox stands for lorn, a symbol of the dawn
Re: maia in openbsd 4.6
Steve Shockley wrote: > On 4/22/2010 6:38 PM, Helmut Schneider wrote: > > Actually it matches any string containing a minus followed by 1 or > > more digits or dots, e.g. "file-4.24" but also "file-.". > > > > I'd use "-(\d+\.)+\d+". > > Thanks. It appears it's not the regex that's the problem, apparently > file changed the output of file -v from stdout to stderr between 4.21 > and 4.24: {component => "file(1)", type => "file -v 2>&1", regexp => "\-([0-9\.]+)", minver => "4.12", might work then. -- No Swen today, my love has gone away My mailbox stands for lorn, a symbol of the dawn
Re: maia in openbsd 4.6
Steve Shockley wrote: > On 4/22/2010 1:02 AM, sonjaya wrote: > > i have problem installed maia in openbsd 4.6 , problem module perl > > file(1). > > http://marc.info/?m=126887732124225 > > Please test and let me know how it goes. I fixed this by just > removing the check. Now that I'm actually looking at it more, I > think maybe that regex ("\-([0-9\.]+)") is looking for X.Y rather > than X.YY, but I'm terrible with regex so I could be mistaken. Actually it matches any string containing a minus followed by 1 or more digits or dots, e.g. "file-4.24" but also "file-.". I'd use "-(\d+\.)+\d+". Helmut -- No Swen today, my love has gone away My mailbox stands for lorn, a symbol of the dawn
Re: pf statistics via SNMP MIBs on 4.6 (or 4.7)
silvershadow...@gmx.de wrote: > the most recent MIBs for OpenBSD is for 4.4 (OpenBSD 4.4: > obsd-mibs44.tar), which can be downloaded from well-known > > http://www.packetmischief.ca/openbsd/snmp/ > > However, I seem to have problems getting it running on a OpenBSD 4.6 > based relayd setup (dmesg below). It builds okay from the ports, > installs, but snmpwalk won't find the OIDs documented. > > Has anyone running SNMP MIBs from this source on a system OpenBSD > 4.4+? 4.5 was the last release I compiled it. But at some day I got tired of building custom packages for snmp every 6 months (apart from the fact that FreeBSD doesn't provide similiar at all) and wrote a small perl script which uses pfctl to query values. It can also be used with Nagios and Cacti. http://www.charlieroot.de/bsd/pf-stats-snmp.pl HTH, Helmut -- No Swen today, my love has gone away My mailbox stands for lorn, a symbol of the dawn
Re: pf questions (just to be sure)
Robert Gilaard wrote: > max-src-conn-rate 2/30 implies 1 in 15 seconds No, it does not! Helmut -- No Swen today, my love has gone away My mailbox stands for lorn, a symbol of the dawn
Re: [4.6-stable] /etc/daily: Null message body; hope that's ok
Antoine Jacoutot wrote: > On Tue, 26 Jan 2010, Helmut Schneider wrote: > > > L. V. Lammert wrote: > > > > > At 02:37 PM 1/26/2010 +, Helmut Schneider wrote: > > > >> I thought I had fat-fingered something with sysmerge, but I > > > >> re-extracted /etc/daily and compared, and there were no > > > differences. > > > > > > > > Same here, I upgraded from 4.5-stable and sysmerged a few times. > > > > > > I get one on a clean install, .. have not had time to > > > troubleshoot. Does this qualify as a bug ? > > > > Seems sysmerge does not upgrade crontabs. Does this qualify a bug? > > :) > > No. How do you run sysmerge? What is the entire output? Did you have > a look at its log file? PEBKAC.
Re: [4.6-stable] /etc/daily: Null message body; hope that's ok
L. V. Lammert wrote: > At 02:37 PM 1/26/2010 +0000, Helmut Schneider wrote: > >> I thought I had fat-fingered something with sysmerge, but I > >> re-extracted /etc/daily and compared, and there were no > differences. > > > > Same here, I upgraded from 4.5-stable and sysmerged a few times. > > I get one on a clean install, .. have not had time to troubleshoot. > Does this qualify as a bug ? Seems sysmerge does not upgrade crontabs. Does *this* qualify a bug? :) Fresh install: 30 1 * * * /bin/sh /etc/daily 30 3 * * 6 /bin/sh /etc/weekly 30 5 1 * * /bin/sh /etc/monthly After upgrade from <4.6: # do daily/weekly/monthly maintenance 30 1 * * * umask 077; /bin/sh /etc/daily 2>&1 | tee /var/log/daily.out | mail -s "`/bin/hostname` daily output" root 30 3 * * 6 umask 077; /bin/sh /etc/weekly 2>&1 | tee /var/log/weekly.out | mail -s "`/bin/hostname` weekly output" root 30 5 1 * * umask 077; /bin/sh /etc/monthly 2>&1 | tee /var/log/monthly.out | mail -s "`/bin/hostname` monthly output" root Obviously since 4.6 daily/weekly/monthly bring their own mail routine with them. For me, "All four scripts now suppress section headers when there is no content to follow. When a script produces no output whatsoever, it does not send mail to root any more. This may require adjustment of your parser scripts."[1] was not clear enough. [1] http://www.openbsd.org/faq/upgrade46.html#newDWM -- No Swen today, my love has gone away My mailbox stands for lorn, a symbol of the dawn
Re: [4.6-stable] /etc/daily: Null message body; hope that's ok
C. Bensend wrote: > > # set -x; umask 077; /bin/sh /etc/daily 2>&1 | tee > > /var/log/daily.out | mail -s "`/bin/hostname` daily output" root > > + set -x > > + umask 077 > > + /bin/sh /etc/daily > > + tee /var/log/daily.out > > ++ /bin/hostname > > + mail -s 'ns3 daily output' root > > Null message body; hope that's ok > > # > > > > Every night I get 2 emails, one is empty and the other one is the > > expected "daily output". > > I'm seeing similar behavior with the January 15th -CURRENT snapshot. > I actually get three daily emails now: Actually, I also get 3 emails. > I thought I had fat-fingered something with sysmerge, but I > re-extracted /etc/daily and compared, and there were no differences. Same here, I upgraded from 4.5-stable and sysmerged a few times. -- No Swen today, my love has gone away My mailbox stands for lorn, a symbol of the dawn
[4.6-stable] /etc/daily: Null message body; hope that's ok
Hi, # set -x; umask 077; /bin/sh /etc/daily 2>&1 | tee /var/log/daily.out | mail -s "`/bin/hostname` daily output" root + set -x + umask 077 + /bin/sh /etc/daily + tee /var/log/daily.out ++ /bin/hostname + mail -s 'ns3 daily output' root Null message body; hope that's ok # Every night I get *2* emails, one is empty and the other one is the expected "daily output". What's wrong? Thanks, Helmut -- No Swen today, my love has gone away My mailbox stands for lorn, a symbol of the dawn
Re: Unable to update ports since 4.4 and now with 4.5
Stuart Henderson wrote: On 2009-05-12, Helmut Schneider wrote: PP2P3P5P=P8P9 P.P=P0P: wrote: 2009/5/12 Helmut Schneider : Lovely! Will this make it into a future (stable) release (just to prepare myself for november 1st)? Yes, it's been commited already. When and where? :) http://www.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm Well, *that* was promptly! Thanks again. -- No Swen today, my love has gone away My mailbox stands for lorn, a symbol of the dawn
Re: Unable to update ports since 4.4 and now with 4.5
PP2P3P5P=P8P9 P.P=P0P: wrote: 2009/5/12 Helmut Schneider : Lovely! Will this make it into a future (stable) release (just to prepare myself for november 1st)? Yes, it's been commited already. When and where? :) -- No Swen today, my love has gone away My mailbox stands for lorn, a symbol of the dawn
Re: Unable to update ports since 4.4 and now with 4.5
Stuart Henderson wrote: It works fine for me through squid, so it looks like whatever proxy it is you have to use doesn't like the doubled /. squid, but for IPv6 mod_proxy. Please try this diff. You can apply it in /usr/libdata/perl5/OpenBSD (or in the src directory shown). It works ok for me with scp, local files, http and ftp. Index: PackageRepository.pm === RCS file: /cvs/src/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm,v retrieving revision 1.65 diff -N -u -p PackageRepository.pm --- PackageRepository.pm 24 Apr 2009 23:22:20 - 1.65 +++ PackageRepository.pm 11 May 2009 15:30:59 - @@ -396,7 +396,7 @@ sub baseurl { my $self = shift; - return "//$self->{host}/$self->{path}"; + return "//$self->{host}$self->{path}"; } sub parse_url Lovely! Will this make it into a future (stable) release (just to prepare myself for november 1st)? Thanks a lot, Helmut -- No Swen today, my love has gone away My mailbox stands for lorn, a symbol of the dawn
Unable to update ports since 4.4 and now with 4.5
Hi, gf4o2m$lc...@ger.gmane.org (openbsd.bugs, 08.11.2008) I started the thread above when I upgraded from 4.3 to 4.4 and I never recieved a reply. Now with 4.5 the problem still persists and is very frustrating: [r...@ns3 ~]# export PKG_PATH="ftp://openbsd.informatik.uni-erlangen.de/pub/OpenBSD/$(uname -r)/packages/$(uname -m)" [r...@ns3 ~]# pkg_add -ui Error from ftp://openbsd.informatik.uni-erlangen.de//pub/OpenBSD/4.5/packages/i386/: ftp: Error retrieving file: 502 Bad Gateway No packages available in the PKG_PATH Looking for updates: complete Cannot find updates for bzip2-1.0.5 cvsup-16.1hp0-no_x11 cyrus-sasl-2.1.22p4 expiretable-0.6 gettext-0.17 gtar-1.20 libdnet-1.10p2 libiconv-1.12 lua-5.1.3 lzma-4.32.6 nagios-plugins-1.4.11 ncftp-3.2.1 net-snmp-5.4.2p1 nmap-4.76 pcre-7.7p0 pftop-0.7p0 pkg-list postfix-2.5.3-sasl2 screen-4.0.3p1 sh-utils-2.0p0 Proceed? [y/N] [r...@ns3 ~]# The problem is the extra "/" after the server name, fetch fails. I am highly frustrated. Really. Any suggestions? It sucks to copy all ports to the local disk to update ports. Thanks, Helmut -- No Swen today, my love has gone away My mailbox stands for lorn, a symbol of the dawn
Re: which filesystems are local?
Jan Stary wrote: This is probably trivial, but what is the most elegant way to find out which of the currently mounted filesystems are local, ie. mounted off a local disk? A simple mount | grep ' (local' works for me, but is there a better way (besides mount -t and listing the 'local' FS types)? As long as you dont't tell us what you'd like to do: man find find -fstype local -- No Swen today, my love has gone away My mailbox stands for lorn, a symbol of the dawn
Re: How do I monitor my PF based firewall?
Dan Carley wrote: 2009/3/4 Falk Brockerhoff - smartTERRA GmbH Am 04.03.2009 um 11:23 schrieb Lars Noodin: Or do you want visualization? http://www.openbsd.org/4.4_packages/i386/pfstat-2.3p0.tgz-long.html Yes, but I want to use cacti for visualization as I use it for anything else :) If you're using 4.4 then `systat states` does the same job as pfstat and doesn't require any installation. For exporting to Cacti, until PF-MIBsm are in OpenSNMPd, you can apply them to net-snmp. Either from ports or referencing them from a source tarball. From memory you may have to write the Cacti definitions yourself though. http://www.packetmischief.ca/openbsd/snmp/ Sidenote: They do not work with net-snmp from ports-stable, but from ports-current the do. @Falk: If you require the pf-enabled snmp port and cannot compile it yourself, pm me. -- No Swen today, my love has gone away My mailbox stands for lorn, a symbol of the dawn
Re: Recording OpenNTPd PID at daemon startup
Henning Brauer <[EMAIL PROTECTED]> wrote: * Helmut Schneider <[EMAIL PROTECTED]> [2008-01-29 15:02]: To stop httpd, which pid should I kill, the oldest, or the most recent? kill 'em all! [EMAIL PROTECTED] ~]# kill 1%'&$carrier lost -- No Swen today, my love has gone away My mailbox stands for lorn, a symbol of the dawn
Re: Recording OpenNTPd PID at daemon startup
Darrin Chandler <[EMAIL PROTECTED]> wrote: If you really want to find the parent you can... $ ps ax -O pgid | grep ntpd 4887 4887 ?? Is 0:00.01 ntpd: [priv] (ntpd) 7164 4887 ?? I 0:00.06 ntpd: ntp engine (ntpd) The header that gets stripped by grep: PID PGID TT STAT TIME COMMAND So you can see that for one process PID==PGID. Bingo. Yes, but there might be a race condition while checking. What I would like to do is to check if a shell script is already active. And I don't want to use a lock file: if [ $(pgrep -of "/bin/sh $0") -ne $MYPID ]; then echo "I'm already active:" 1>&2 echo $(pgrep -olf "/bin/sh $0") 1>&2 exit 1 fi If pgrep (with -o support) finds a process that is *older* than MYPID the script is already active. afaik that construction is faster than grepping ps, piping and comparing two values but if there is a better solution I'm pleased to hear about. :) -- No Swen today, my love has gone away My mailbox stands for lorn, a symbol of the dawn
Re: Recording OpenNTPd PID at daemon startup
pierre <[EMAIL PROTECTED]> wrote: On Tue, 29 Jan 2008 11:37:41 +0100 "Helmut Schneider" <[EMAIL PROTECTED]> wrote: Claudio Jeker <[EMAIL PROTECTED]> wrote: We don't believe in pid files. Use pgrep(1) and pkill(1) instead, you will never have stale info that way. pgrep on OpenBSD does not support '-o' (Select only the oldest). It is - well - it could be more useful. man pgrep -n Match only the most recently created process, if any. Is that what you're looking for ? No. It might find a child but it will never find the parent. [EMAIL PROTECTED] ~]# pgrep -fl httpd 81972 /usr/local/sbin/httpd 81960 /usr/local/sbin/httpd 1115 /usr/local/sbin/httpd 1114 /usr/local/sbin/httpd /usr/local/sbin/httpd 1109 /usr/local/sbin/httpd 1108 /usr/local/sbin/httpd 979 /usr/local/sbin/httpd [EMAIL PROTECTED] ~]# To stop httpd, which pid should I kill, the oldest, or the most recent? OK, 'pgrep -fl httpd | tail -1' does the trick, and pgrep is not safe enough for finding parents, but... -- No Swen today, my love has gone away My mailbox stands for lorn, a symbol of the dawn
Re: Recording OpenNTPd PID at daemon startup
pierre <[EMAIL PROTECTED]> wrote: On Tue, 29 Jan 2008 11:37:41 +0100 "Helmut Schneider" <[EMAIL PROTECTED]> wrote: Claudio Jeker <[EMAIL PROTECTED]> wrote: We don't believe in pid files. Use pgrep(1) and pkill(1) instead, you will never have stale info that way. pgrep on OpenBSD does not support '-o' (Select only the oldest). It is - well - it could be more useful. man pgrep -n Match only the most recently created process, if any. Is that what you're looking for ? Not at all. I might find a child but I will never find the parent. [EMAIL PROTECTED] ~]# pgrep -fl httpd 81972 /usr/local/sbin/httpd 81960 /usr/local/sbin/httpd 1115 /usr/local/sbin/httpd 1114 /usr/local/sbin/httpd /usr/local/sbin/httpd 1109 /usr/local/sbin/httpd 1108 /usr/local/sbin/httpd 979 /usr/local/sbin/httpd [EMAIL PROTECTED] ~]# To stop httpd, which pid should I kill, the oldest, or the most recent? OK, 'pgrep -fl httpd | tail -1' does the trick, and pgrep is not safe enough for finding parents, but... -- No Swen today, my love has gone away My mailbox stands for lorn, a symbol of the dawn
Re: Recording OpenNTPd PID at daemon startup
Claudio Jeker <[EMAIL PROTECTED]> wrote: We don't believe in pid files. Use pgrep(1) and pkill(1) instead, you will never have stale info that way. pgrep on OpenBSD does not support '-o' (Select only the oldest). It is - well - it could be more useful. -- No Swen today, my love has gone away My mailbox stands for lorn, a symbol of the dawn