Re: fbsd 6.2 pf starts -- but not on boot

2007-06-04 Thread Ian Smith
On 4 Jun 2007 14:03:20 -0700 snowcrash+freebsd <[EMAIL PROTECTED]> wrote:

 > on boot, pf is, apparently, not starting.
 > 
 > but, if i exec
 > 
 >  /etc/rc.d/pf start
 > 
 > immediately after boot to prompt is done, then all's OK.
 >
 > the only related (?) messages -- error or otherwise -- i've found are
 > on startup.

I really don't know whether this might be related to your problem, but
my proofreading eye was distracted by this in your rc.conf: 

 > # PPP
 > ppp_enable="YES"
 > ppp_mode="ddial"
 > ppp_nat="NO"
 > ppp_profile="ppp`"

What rc would make of that backtick inside quotes, I know not ..

cheers, Ian

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


Re: COM1 problems

2007-06-03 Thread Ian Smith
On Sun, 3 Jun 2007 01:01:38 -0700 (PDT) Tim Judd <[EMAIL PROTECTED]> wrote:

 > Hi there, new installation, 6.2-STABLE.
 > 
 > I have a Belkin UPS on COM1 and sysutils/nut is trying to talk with it.
 >  I know it talks with it, because it has in the past.  The problem I'm
 > getting is that NUT is just filling the screen with errors, tty
 > overflows, and various problems related to communication on that port
 > with the UPS.

If this goes unresolved, try pasting some real error messages?

 > Looking at NUT's website, they say the UPS communicates at 2400 baud
 > 8N1 and I'd like to believe that.  I tested without specifying a speed:
 > # tip com1
 > and didn't get anything..  waited 30 seconds or so.  After reading
 > NUT's website, I tried:
 > # tip -2400 com1
 > and got binary data (not readable information, but data none-the-less).

Quite likely symptomatic of baudrate mismatch then (without seeing any..)

 > The kernel reports the port as sio0, but sio0 doesn't exist in /dev
 > the only serial port I see is cuad0{,.init,.lock} and that seems to be
 > hard-coded by some init script (but I don't know where).  cuad* also is
 > said to be a dialout line, not a generic com device.  /etc/remote does
 > indicate it is a generic device in the sense it will just pass
 > input/output...

You want cuaa0, which will likely appear when you open it.  cuad0 (once
ttyd0) might appear if you've got some getty running on it .. make sure
/etc/ttys has this set to 'off' - unless of course nut claims it there? 

tip or anything should be able to open cuaa0 anyway, assuming nothing's
actually locking (ie also using) that dialup (not 'dialout') device.

 > How can I configure /dev/cuad0 to be 2400 baud fixed?

'tip -2400 com1' will use /dev/cuaa0 at 2400, but I suspect that's not
the baudrate your UPS is talking.  Perhaps 2400 is only a default, and
your UPS is set to something else?  From within tip:
  ~?   help
  ~v   show variables
  ~s ba?   show baudrate
  ~s ba=1200   set baudrate .. till traffic looks like ascii ..

 > thanks for any tips and pointersit's been a while since I've dealt
 > with serial ports.

I don't know your UPS (nor which model) but a little googling is a
dangerous thing; from 'nut belkin upd freebsd' this smelled useful:

 http://www.networkupstools.org/doc/2.0.1/INSTALL.html

Um, does it use a regular or cross-over cable?  CTS/RTS used?  Carrier
asserted, or needs setting up as a hardwired line? (as in /etc/remote) 

As Roland said:

 >> Look at sio(8), under FILES; the callin ports at /dev/ttyd?.

and maybe the para before FILES too.  Don't worry about the locking
stuff, though if curious, 'serial' has moved from /etc/ to /etc/rc.d/
but I've not played with that since FreeBSD 2.2.6 dialups years ago.

Cheers, Ian

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


Re: Restore UFS snapshot

2007-05-28 Thread Ian Smith
On Sun, 27 May 2007 11:01:53 -0400 Maxim Khitrov <[EMAIL PROTECTED]> wrote:
 > On 5/27/07, Roland Smith <[EMAIL PROTECTED]> wrote:
 > > On Sat, May 26, 2007 at 07:08:31PM -0400, Maxim Khitrov wrote:
 > > >  I don't think he is talking about that. From what I understand about
 > > >  the snapshot system (correct me if I'm wrong) is that a snapshot
 > > >  creates it's own file system by remembering, for example, what the
 > > >  superblock was at the time of the snapshot. After that, the live file
 > > >  system continues on its way keeping track of the snapshot, but
 > > >  modifying its own blocks to account for the changes afterwards.
 > >
 > > More or less. You should read §8.7 of McKusick's book, or the paper he
 > > wrote about it;
 > > http://www.usenix.org/publications/library/proceedings/usenix99/mckusick.html

Interesting thread.  I've only read the PDF referred to there, namely
http://www.usenix.org/publications/library/proceedings/usenix99/full_papers/mckusick/mckusick.pdf
several times, and particularly the snapshot section from p.15 of that,
and I'm almost beginning to get it, but can't claim more than that ..

 > > For instance, every time you change a block on a filesystem that has a
 > > snapshot, the filesystem checks wether that block is in the snapshot
 > > already. If not it writes the old contents of that block to the snapshot
 > > before writing the new contents to the filesystem block.
 > >
 > > >  I think what Svein wants to do is essentially overwrite a few blocks
 > > >  on the live file system, loosing all references to the changes that
 > > >  have been made and in effect returning the file system to the state it
 > > >  was in when the snapshot was taken.
 > >
 > > It's not just a question of references. You'll have to copy all the
 > > changed blocks back, and change the inodes, et cetera.
 > >
 > > >  This is different from simply
 > > >  copying the contents of the snapshot back to the disk via an md
 > > >  device.
 > >
 > > If you are using something like rsync it's not very much different.
 > >
 > > The point is that you're using established and debugged methods and code
 > > to change the filesystem, instead of writing new tools to do the same.

I share Roland's concern about the reliability of any new code designed
to accomplish the 'full rollback' desired, but of course anything would
have to undergo incredibly rigorous testing before it would be allowed
anywhere near even -CURRENT I'm sure, same as softupdates/snapshots has. 

That said, I think it is worthwhile finding out whether this is even
possible with the amount of data and metadata saved in snapshots to
accomplish their existing utility (which I still find pretty awesome,
and despite re-reading that section again several times, mysterious ..)

 > > >  This way he would restore the snapshot and lose it at the same
 > > >  time, but the operation should be O(1) in theory (time and space), as
 > > >  opposed to O(n) which any normal back-up/restore is.
 > >
 > > You don't lose the snapshot untill you delete it. And even then there
 > > are situations where not all the used space can be reclaimed. If a
 > > subsequent snapshot was taken, for instance.
 > >
 > > The process of undoing the snapshot can't be O(1). Because the time
 > > needed to create the shapshot isn't either.
 > 
 > Wait a sec, when you mount a snapshot as a memory disk, does that
 > memory disk contain the snapshot as well? I haven't done this in a
 > while, but since the snapshot didn't exist when it was being created,
 > I don't see how it would. Now when you mount that snapshot, the
 > superblock is read and from there we find out all the necessary
 > information about the file-system. This is an O(1) operation is it
 > not?
 > 
 > I'm not seeing why this process can't be slightly modified to
 > roll-back the live file system. There shouldn't be a need to copy any
 > changed blocks or modify inodes because mounting the snapshot doesn't
 > require this. The data is already there, all the references to it are
 > there, these references are just not in the right place for the live
 > file system to use them. The snapshot superblock contains the same
 > information regarding the size of the file-system and all other
 > parameters, so if we were to overwrite the superblock why wouldn't
 > everything return to the same state you see it in when you mount that
 > same snapshot?

I guess contacting Marshall McKusick might be the quickest way to find
out whether there's sufficient metadata available to do that; he'd know
off the top of his head, I'm sure.  So should several other people, I
guess, but more likely those frequenting -fs, -hackers, maybe -arch? 
 
 > This is why I said that you lose the snapshot itself, because it's not
 > there when it was taken, and you lose the references to all the
 > changed blocks of the live file system. Through the data would still
 > be there on the disk, as far as the snapshot is concerned it's now
 > free space 

gstat [was: raid or not raid]

2007-05-25 Thread Ian Smith
Hey Beto,

On Fri, 25 May 2007 19:55:47 +1000 Norberto Meijome wrote:

 > replying to your email down the thread...but using this content...

hijacking the thread almost entirely off to the side ..

 > > 0  6  66278.5  0  00.05.0| ad4s1g
 > 
 > the g partition in slice 1 of disk ad4.
 > 
 > They all get used (from the GEOM POV) when , for example, userland
 > access the fs located in ad4s1g . 
 >
 > clear as mud?  ;)

Not having played with RAID here, gstat was useful news, ta, especially
as vmstat & iostat don't show acd0 anymore .. however I'm a bit puzzled
by the below; nothing but 'find / -name xdfsfdxfx' running, so why does
it show so much write activity?  This is consistent (with find anyway).

dT: 10.005  flag_I 1000us  sizeof 240  i -1
 L(q)  ops/sr/s   kBps   ms/rw/s   kBps   ms/w   %busy Name
0  0  0  00.0  0  00.00.0| fd0
0  0  0  00.0  0  00.00.0| cd0
11561348806.7 22352   23.0   89.0| ad0
0  0  0  00.0  0  00.00.0| acd0
0  0  0  00.0  0  00.00.0| ad0s1
11561348806.7 22352   23.5   89.3| ad0s2
[..]
0  0  0  4   23.4  0  00.00.7| ad0s2a
0  0  0  00.0  0  00.00.0| ad0s2b
0  0  0  00.0  0  00.00.0| ad0s2c
0  0  0  00.0  0  00.00.0| ad0s2d
11551338766.8 22352   24.0   90.6| ad0s2e

I thought maybe updating file access times? but would that be so much of
a penalty, even on this 300MHz laptop with a UDMA33 5400rpm drive ..

BTW, this is on 5.5-STABLE, seeing you weren't sure about it on 5.x

 > Your reasoning is excellent -- it's only your basic assumptions that
 > are wrong. 

Probably very apt :)

Thanks again, Ian

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


Extended partition

2007-05-24 Thread Ian Smith
On Wed, 23 May 2007 17:30:29 +0330 Mohsen Pahlevanzadeh <[EMAIL PROTECTED]> 
wrote:
 > Dear all,
 > I have 1 freebsd partiotion & 4 other partitions:
 > 1.Etended DOS (Primary)
 > 2.ext3 logical under 1
 > 3.ext3 logical under 1
 > 4.solaris swap (primary)
 > When i mount ext3 partitions, i receive "invalid argument"
 > mount_ext2fs -o ro /dev/ad0s6 /media/mymountpoint
 > I have checked ad0s6 exist.
 > Please help me.

The first slice in your 'extended partition' should be ad0s5.

On top of your text description, please provide the output of:

# fdisk ad0

# ls /dev/ad0*

Cheers, Ian

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


Re: Re[2]: notebook cpu throttling [solved]

2007-05-23 Thread Ian Smith
On Wed, 23 May 2007, Ghirai wrote:

 > > I'm kinda interested in these fujitsu-siemens laptops myself, so I'm
 > > still keen to see your 'sysctl dev.cpu.0.freq_levels' please? 

 > Ok, i think i got it working.
 > 
 > dev.cpu.0.freq_levels showed about 14 possibilities.

Would you care to cut'n'paste that result here, just for interest?

 > It turned out that powerd was lowering it down to 100MHz,
 > or 50MHz per core.
 > 
 > Playing with debug.cpufreq.lowest, i increased it gradually
 > until KDE/Xorg behaved normal; for my system it was 800MHz,
 > which is 400MHz/core.

I don't understand figuring it as half frequency per core, but I've not
run an SMP box myself.  As long as it works fine for you, that's great.

Cheers, Ian

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


Re: notebook cpu throttling

2007-05-22 Thread Ian Smith
On Tue, 22 May 2007 19:35:10 +0300 Ghirai <[EMAIL PROTECTED]> wrote:
[..]
 >  >> I did that, but now xorg constantly uses 20-30% CPU.
 >  >> 
 >  >> CPUs were running cooler indeed, but everything ran jerky,
 >  >> because of the xorg cpu usage.
[..]
 > > Point being, if powerd has selected your lowest cpu frequency because
 > > load is less than default (or as specified by -i and -r switches) and
 > > this is (say) 1/4 of full speed, then something that normally showed 5%
 > > cpu will now show as using 20% (of available cpu cycles at that speed)
 > 
 > > You can tune your powerd idle levels more towards performance, and/or
 > > you can set a higher minimum cpu freq with sysctl debug.cpufreq.lowest
 > > from among your available levels.
[..]

 > I suspected this; xorg just reporting to use 20-30% cpu doesn't bother
 > my, what bothers me is the fact that mouse cursor and everything moves
 > jerky.
 > 
 > I'll try to raise the min. freq., maybe powerd lowers it too much..

Maybe.  In one recent example, a 1400MHz box (Thinkpad T42p) had freqs
all the way down to 75MHz while still running with 1mS slicing (1000HZ) 
apparently losing i8254 timer interrupts (when using APM, not with ACPI)

powerd(8) in adaptive mode with default settings will lower cpu freq one
level whenever the load idle is 90% or more, and raise freq (two levels) 
whenever idle gets less than 65%.  Looks like if you set that to say 75%
your xorg alone would kick it up.  Of course you must be careful not to
set the shiftpoints too close together, or you'll observe oscillation ..
again, running 'powerd -v' is useful while you're playing with tuning.

Re jerkiness, you might also benefit by decreasing the polling interval
(how often powerd checks load average) from 500mS to perhaps half that? 

I'm kinda interested in these fujitsu-siemens laptops myself, so I'm
still keen to see your 'sysctl dev.cpu.0.freq_levels' please? 

Cheers, Ian

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


Re: notebook cpu throttling

2007-05-22 Thread Ian Smith
On Tue, 22 May 2007 00:56:08 +0300 Ghirai <[EMAIL PROTECTED]> wrote:
 > Hello Roland,
 > 
 > Monday, May 21, 2007, 11:08:13 PM, you wrote:
 > 
 > > On Mon, May 21, 2007 at 09:52:22PM +0300, Ghirai wrote:
 > >> Hello list,
 > >> 
 > >> I'm running 6.2-RELEASE, SMP, on a
 > >> Fujitsu-Siemens Amilo Pro v3205 (Core Duo).
 > >> 
 > >> Everything works fine, except the cpu throttling,
 > >> which makes the fan start quite often.
 > >> 
 > >> Is there any way to fix this?
 > 
 > > You need to do three things (as root);
 > 
 > > 1) Load the cpufreq module 'kldload cpufreq'.
 > > 2) Put 'powerd_enable="YES"' in your /etc/rc.conf
 > > 2) Start powerd: '/etc/rc.d/powerd start'
 > 
 > > Roland
 > 
 > Thanks for the hint.
 > 
 > I did that, but now xorg constantly uses 20-30% CPU.
 > 
 > CPUs were running cooler indeed, but everything ran jerky,
 > because of the xorg cpu usage.
 > 
 > Note that i haven't upgraded to 7.2 yet,
 > but i don't think this is the problem.

This might not really indicate any problem.  Firstly, what are your
# sysctl dev.cpu.0.freq_levels

Try watching the current cpu speed (dev.cpu.0.freq) while running under
powerd.  You can watch it shift under various loads by running 'powerd
-v' in foreground, show it by running a script sleeping for eg a minute,
or use (say) gkrellm with gkfreq plugin to display cpu speed constantly.

Point being, if powerd has selected your lowest cpu frequency because
load is less than default (or as specified by -i and -r switches) and
this is (say) 1/4 of full speed, then something that normally showed 5%
cpu will now show as using 20% (of available cpu cycles at that speed) 

You can tune your powerd idle levels more towards performance, and/or
you can set a higher minimum cpu freq with sysctl debug.cpufreq.lowest
from among your available levels.

powerd's default shiftpoints work on my T23, but it's only a 2-speed :)

Cheers, Ian

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


Re: Remote login via modem [coda]

2007-05-20 Thread Ian Smith
I'd address this also to [EMAIL PROTECTED], but my prior message evoked:

On Sun, 20 May 2007 16:02:27 +1000 (EST), Mail Delivery Subsystem wrote:

 > The original message was received at Sun, 20 May 2007 16:02:09 +1000 (EST)
 > from [EMAIL PROTECTED]
 > 
 >- The following addresses had permanent fatal errors -
 > <[EMAIL PROTECTED]>
 > 
 >- Transcript of session follows -
 > ... while talking to mail.metron.com.:
 > >>> RCPT To:<[EMAIL PROTECTED]>
 > <<< 571 5.0.0 Local Policy REFUSAL: Confirmed network-wide opt-out
 > 554 <[EMAIL PROTECTED]>... Service unavailable

I've not seen a 'Confirmed network-wide opt-out' SMTP response before. 

Any idea what it indicates, apart from the obvious rejection of mail?

Ian

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


Re: Remote login via modem

2007-05-19 Thread Ian Smith
On Sat, 19 May 2007 12:45:35 -0700 Lou Katz <[EMAIL PROTECTED]> wrote:
 > On Sat, May 19, 2007 at 07:49:46AM +0200, Nikola Lecic wrote:

Sorry Nicola, no cc, your email address wasn't quoted ..

 > > On Sat, 19 May 2007 11:49:47 +1000
 > > Ivan Carey <[EMAIL PROTECTED]> wrote:
 > > 
 > > > Hello,
 > > > I would like to be able to access my network remotely via modem
 > > > access.
 > > > 
 > > > What I am trying to achieve is this. At the office I have a server,
 > > > this server is Not connected to the Internet, I need to be able to
 > > > Administer it from my Home office, so I am thinking that I need to
 > > > access it via a serial modem.
 > > > What do I need to do to achieve this.
 > > 
 > > You need getty(8) or /usr/ports/comms/mgetty+sendfax. Please read
 > > 
 > >   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/dialup.html
 > >   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/userppp.html

 > This shows how to connect to some other ISP with ppp. I need to setup MY 
 > machine
 > to accept INCOMING PPP, and can't find any doc (though I could have 
 > overlooked it).
 > Pointers to setup of incoming ppp dialin greatly appreciated.

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/userppp.html

Assuming you're using userppp rather than pppd.  The above is a useful
outline, but for some detail I include the dialup configuration from an
old server here.  Note this was for FreeBSD 2.2.6 and a few things have
changed, like the names of ttydX and cuaaX, but maybe it'll help.

/etc/ttys:

[.. normal stuff, then ..]
# dialout: cuaa0 used by ppp
ttyd0   "/usr/libexec/getty std.57600"  vt100   off insecure
# dialups:
ttyd1   "/usr/local/sbin/mgetty"vt100   on insecure
ttyd2   "/usr/local/sbin/mgetty"vt100   on insecure
ttyd3   "/usr/local/sbin/mgetty"vt100   on insecure

/usr/local/etc/mgetty+sendfax/login.config:

# ppp logs in (utmp) once authenticated
/AutoPPP/ - -   /etc/ppp/ppp-pap-dialup @
#
#% 4/9/4 deny all members for direct (non-ppp, terminal) logins except ..
smithi  smithi  smithi  /usr/bin/login @
greggreggreg/usr/bin/login @
*   -   -   /usr/bin/false @

/usr/local/etc/mgetty+sendfax/mgetty.config:

port ttyd1
debug 4
fax-id 00 00 00
speed 115200
switchbd 19200
direct NO
blocking NO
port-owner uucp
port-group dialer
port-mode 0660
toggle-dtr YES
toggle-dtr-waittime 400
data-only yes
fax-only NO
modem-type data
# Spirit 336L (Rockwell chipset)
init-chat "" ATS0=0Q0&D2&C1S95=47 OK
modem-check-time 600
rings 2
answer-chat "" ATA CONNECT \c \r
answer-chat-timeout 60
autobauding no
ringback NO
ringback-time 30
ignore-carrier false
issue-file /etc/issue
prompt-waittime 500
login-prompt @ login:
login-time 60
diskspace 2048
notify faxadmin
fax-owner uucp
fax-group dialer
fax-mode 0660

port ttyd2
[.. ditto; port ttyd3 ditto, modulo init-chat for other type modems ..]

/etc/ppp/ppp-pap-dialup:

#!/bin/sh
#% ppp-pap-dialup 28Jun98, test version, adapted from:
#  ppp-shell 25May98 smithi from 2.2.5 handbook, PPP Configuration
IDENT=`echo $0 | sed -e 's/^.*-\(.*\)$/\1/'`
# CALLEDAS="$IDENT"
TTY=`tty`
IDENT=`basename $TTY`
/usr/sbin/ppp -direct pap$IDENT

/etc/ppp/ppp.conf:

default:
  allow users *
  enable throughput
  set log phase chat connect carrier link ipcp ccp ID0 TUN
  set speed 115200
  disable lqr
  deny lqr
  set timeout 1200

# dialout line: (4Jul98) =

telstra:
  set log +command
  allow users root smithi greg
  allow mode auto ddial dedicated background
  set server 3000
  set device /dev/cuaa0
  set timeout 0
# rest of dialout config not shown ..

# dialup lines: =

papttyd1:
  set server 3001
  allow users *
# force use of pap, use /etc/passwd auth
  enable pap
  enable passwdauth
# for broken linux pppd callers :(
  disable pred1
  deny pred1
  disable deflate
  deny deflate
#
  set ifaddr x.y.z.145 x.y.z.161 255.255.255.255
  delete ALL
# 1may99 keepalive filters
  set afilter 0 deny icmp
  set afilter 1 deny tcp dst eq 110
  set afilter 2 deny tcp src eq 110
# [.. various others ..]
  set afilter 15 deny udp src eq 53
  set afilter 16 deny udp dst eq 53
# last allowed is rule 19
  set afilter 17 permit 0/0 0/0

papttyd2:
  set server 3002
  allow users *
# [.. ditto ..]
  set ifaddr x.y.x.146 x.y.z.162 255.255.255.255
  delete ALL

# [ ditto papttyd3: ..]

Cheers, Ian

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


Re: Auto shutdown/restart software for FreeBSD?

2007-05-17 Thread Ian Smith
On Tue, 15 May 2007 00:16:34 -0500 WizLayer <[EMAIL PROTECTED]> wrote:
 > On Monday 14 May 2007 08:27:48 pm you wrote:
 > > On May 13, 2007, at 7:13 PM, WizLayer wrote:
 > > > On Sunday 13 May 2007 07:17:14 pm Aftab Jahan Subedar wrote:

 > > >> Would it recharge the battery fully after discharge? I dont think so.
 > > >> So you got to  recharge the external battery EXTERNALLY after power
 > > >> failure.

Indeed.  UPSes are designed to start recharging their (usually 12V
sealed lead-acid) batteries at around the 5-hour rate, which might be
say 2.4A for a 12Ah battery, for a say 300VA UPS, tapering that off as
voltage rises.  Using (just) the UPS to recharge a say 100Ah vehicle
battery at that rate would take maybe 2 days, assuming the UPS didn't
overheat and perhaps blow up trying.

However a simple (regulated) charger on the external battery is fine,
though possibly thoroughly confusing the UPS' brains about how long
recharge should take, available capacity and such.  For adding external
batteries, simple 'dumb' UPSes are usually better than 'smarter' ones.

[..]

 > > This is another approach that seems like it would be practical:
 > > Use deep cycle car batteries, trickle charge with solar panels.

Sure, you can do that, assuming it's sunny during/after a power outage.
Here at least, outages mostly tend to correlate with stormy weather.

 > > If a desktop computer can run on square wave generated by
 > > dc/ac converter, use that as a power backup system, It would
 > > have to have some kind of switching system to detect main
 > > power drop and switch to the backup system.

That's pretty much what a UPS is doing, though they usually provide a
'modified square wave' that somewhat more closely approximates a sine
wave output.  Note however that a UPS has to switch cleanly from mains
to battery power supplying the last stage inverter within just a few
milliseconds, ie a small fraction of a single mains 50 or 60Hz cycle. 

 > > Perhaps someone would be willing to, with engineering expertise
 > > put together servers that would work on laptop batteries, like a
 > > laptop. I do have one machine that has Yellow Dog linux (Mac
 > > Powerbook 3400c) that runs 24/7 as my backup DNS server.
 > > JK

Laptops as servers is sure the way to go on solar-powered houses; hard
to find or make a better UPS than a laptop p/s.  For desktop boxes,
there are available computer power supplies that run straight off 12V.
I hunted for a mob called DC-PC, but they may be defunct.  eg check: 

  http://www.powerstream.com/mini-itx.htm
  http://www.mini-box.com/s.nl/sc.8/category.13/.f

 > Why settle for a square wave?  It's not hard to clean that up, and 
 > besides...  

Very much easier said than done :) and besides ..

 > Wouldn't that bring mayhem and havoc on a scanner (ie, I'm pretty sure that 
 > you your screen would do very unhappy things)?  LCD screen? don't know.  (or 
 > a system's power supply over long term?  hmmm)

Devices that aren't happy with non-sinewave power include such as laser
printers, but those you mention here use switching supplies themselves,
and are usually happy enough running on square-wave inverters, as long
as the inverter can handle the peak startup currents often demanded.

Computer power supplies aren't fazed by square wave (or for that matter,
high voltage DC) input, as they're chopping the input waveform anyway.
Also, you probably don't want printers and such running off the UPS.

 > As far as the type of batteries, deep cycle marine batteries, whatever.  It 
 > doesn't really matter except to say that some types can be fully discharged 
 > and some would be ruined on a full discharge.  The health and monitoring 
 > portion of the UPS would have to be designed with those limits in mind (and, 
 > hey...  That could be part of the embedded mprocessors job, too...  more 
 > options).

Well that's just what any decent UPS does.  While I wouldn't want to
discourage anyone from learning embedded design and programming, it's
terrific fun, but you can expect to spend hundreds of hours and not a
little cash doing so by trial and error, to save on a what, $200 UPS?

 > Switching power from one source to another is something that I've not had a 
 > lot of  luck with, esp with sensitive stuff like a computer's power supply 
 > (touchy).  On the other hand clean, dc power in a parallel circuit is as 
 > simple as it gets.  Edison had a good idea after all.  
 > 
 > Look at the battery as your constant source, and work away from that.  Your 
 > secondary source merely compliments the battery.  So long as you use 
 > regulators for your "other sources", it will stay "Clean by default."  :)
 > 
 > As far as switching power sources from regular charger to something like 
 > solar 
 > panels, same concept...  Don't switch from-to anything.  Keep it constantly 
 > hooked up in parallel with the battery.  

For best efficiency, most UPSes use the mains as long as it's available,
even in a degraded state such as

Re: what's the easiest way to de-html-ize files?

2007-05-14 Thread Ian Smith
On Sat, 12 May 2007 14:34:52 -0700 Gary Kline <[EMAIL PROTECTED]> wrote:
 > On Mon, May 14, 2007 at 12:09:07PM -0700, Chuck Swiger wrote:
 > > On May 12, 2007, at 12:54 PM, Gary Kline wrote:
 > > >This is for those of us who appreciate ASCII or straight
 > > >  ISO_8859-15 rather than marked up files.  I have slapped together
 > > >  a crude C program that does scotch (or *cleanse*) text of
 > > >   and so on.   Still... is there some standalone converter
 > > >  that gets rids of markup more elegantly?   Something where i
 > > >  can say
 > > >
 > > >  % cmd file_1.html ... file_N.html and output file_1.text ...
 > > >  file_N.text?
 > > 
 > > Perhaps:
 > > 
 > >   lynx -dump file1.html ... > file.text
 > > 
 > > ...?
 > 
 >  Hm, maybe Ineed Bill Campbell's -force_html switch.  
 > 
 >  Yes, seems that way.  USing just -dump got most of them, but
 >  using the -force_html caught all.  Need to script something to
 >  reformat, but the worst of it's done!

Also, if using Mozilla (so, I would assume, Firefox) the 'Save Page As'
dialog offers a picklist for 'Files of Type' that includes 'Text Files'.

This does a pretty decent job of producing text from HTML files, and is
quicker than firing up lynx (or links) if you're already viewing a page.

Cheers, Ian

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


Re: mounting an external Hard Drive

2007-05-07 Thread Ian Smith
On Mon, 7 May 2007 19:55:33 +0200, cadu aranha <[EMAIL PROTECTED]> wrote:

 > Hello people,
 > i have a USB external HD with FAT32 fs.
 > Today i connected it to my FBSD and
 > got the following mesg entry:
 > 
 > da0 at umass-sim0 bus 0 target 0 lun 0
 > da0:  Fixed Direct Access SCSI-0 device
 > da0: 1.000MB/s transfers
 > da0: 238475MB (488397168 512 byte sectors: 255H 63S/T 30401C)
 > 
 > # ls /dev/da0*
 > /dev/da0/dev/da0s1  /dev/da0s2  /dev/da0s5

Note the appearance of /dev/da0s5 ..

 > mount_ntfs /dev/da0s1 /mnt
 > #% ok, it worked. Now
 > # mount_ntfs /dev/da0s2 /mnt2
 > mount_ntfs: /dev/da0s2: Invalid argument
 > 
 > #%of course, it is a FAT32 filesystem. Then ...
 > # mount_msdosfs /dev/da0s2 /mnt2
 > mount_msdosfs: /dev/da0s2: Invalid argument
 > # mount_msdosfs /dev/da0s5 /mnt2
 > mount_msdosfs: /dev/da0s5: Invalid argument
 > # dmesg
 > mountmsdosfs(): disk too big, sorry
 > 
 > # fsck_msdosfs /dev/da0s2
 > ** /dev/da0s2
 > Invalid signature in fsinfo blockfix? [yn] y
 > Floating exception (core dumped)

Ouch; hopefully didn't screw up anything.  Check with Partition Magic?

 > I do not know what else could i do.
 > It was a 250G HG with NTFS. The whole could be mounted
 > by mount_ntfs. Then i split it in one NTFS and one FAT32
 > using Partition magic. Now i can mount the former and the
 > latter not. On windows there is no problem in mounting.

The FAT32 is in what DOS calls the 'Extended Partition', here da0s2.  It
could contain a number of 'DOS drives' like D:, E:, etc.  Here you have
made one 'DOS drive', probably 'drive D:', and it's accessed in FreeBSD
as slice ad0s5.  DOS 'drive E:' would be accessed as ad0s6 and so on;
this way you can mount multiple MSDOSFS, NTFS and HPFS 'partitions'.

So the 'Extended Partition' da0s2 is not mountable per se; try
'mount_msdosfs /dev/da0s5' and likewise 'fsck_msdosfs /dev/da0s5'

You'll still need the MSDOSFS_LARGE support if your FAT32 slice ad0s5 is
over 128GB by itself.

Cheers, Ian

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


Re: disaster recovery - did I do the right thing?

2007-05-07 Thread Ian Smith
On Sat, 5 May 2007 17:05:42 -0600 Ray <[EMAIL PROTECTED]> wrote:

 > Hello all,
 > I did something stupid the other day (sleep deprivation combined with 
 > a "clever" hack were the main reasons), and I'm just curious if I did the 
 > right thing afterwards.
 > 
 > The mistake:
 > /usr/local/# rm -f *
 > note that root was running bash as a shell at the time, found 
 > in /usr/local/bin or something.
 > 
 > What I did was to start over, reinstall from scratch.
 > my question, was there an easier way?

Ray, I've been watching this thread, and you've had some good advice
about backups etc, but if you really did 'rm -f *' in /usr/local (NOT
'rm -rf *') then it's very likely that you deleted no files at all.

paqi% ll -rt /usr/local
total 134
drwxr-xr-x3 root  wheel512 Feb  9  2006 VFS
-rw-r--r--1 root  wheel  0 Aug 27  2006 moved_portsnap_from_var_db
drwxr-xr-x3 root  wheel512 Dec  3 22:31 src
drwxr-xr-x8 root  wheel512 Dec 10 17:17 www
drwxr-xr-x7 root  wheel512 Dec 10 19:34 libdata
drwxr-xr-x2 root  wheel512 Dec 10 19:52 build-1
drwxr-xr-x9 root  wheel512 Dec 10 21:59 libexec
drwxr-xr-x2 root  wheel512 Dec 10 22:14 env
drwxr-xr-x2 root  wheel   2048 Dec 10 22:53 info
drwxr-xr-x6 root  wheel512 Dec 10 23:23 gnu-autotools
drwxr-xr-x7 root  wheel512 Dec 27 16:33 diablo-jre1.5.0
drwxr-xr-x3 root  wheel  25088 Jan 28 01:36 bin
drwxr-xr-x   83 root  wheel   1536 Feb 11 22:37 share
drwxr-xr-x  139 root  wheel  24064 Feb 12 18:35 include
drwxr-xr-x   33 root  wheel  55296 Feb 12 18:35 lib
drwxr-xr-x   27 root  wheel   1536 Feb 12 18:38 etc
drwxr-xr-x2 root  wheel   1024 Mar  3 20:53 sbin
drwxr-xr-x3 root  wheel512 Mar 29 23:20 portsnap
drwxr-xr-x   28 root  wheel   1024 May  5 04:22 man

The only file 'rm -f *' in /usr/local would remove here is a comment I
made for myself with 'touch moved_portsnap_from_var_db'; 'rm *' (with or
without -f) does not remove directories (unless you also use -r).

I can't say what was in _your_ /usr/local, but I've just checked on 4.8,
4.10, 5.5-STABLE and 6.1-RELEASE systems, and none of them install plain
files in /usr/local at all, just directories.  So you may be lucky .. 

Cheers, Ian

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


(no subject)

2007-05-01 Thread Ian Smith
On Mon, 30 Apr 2007 19:42:49 +0200 (CEST) Wojciech Puchar <[EMAIL PROTECTED]> 
reckoned:

 > why ehci isn't detected on IBM T23 laptop

The T23 doesn't have / do USB 2.0

 > possibly
 > 
 > pci2:  at device 2.0 (no driver attached)
 > 
 > is the undetected ehci

No it's not, but I don't know what it is either; mine has that in dmesg
also, and my dmesg for uhci / usb ports 0-2 appears identical to yours.

 > i have compiled ehci in kernel

It's in GENERIC anyway.  If the T23 had USB2 ports, ehci would use 'em.

You can use a USB2 pccard if you need to, check the compatibility list.

===

Re your prior ACPI message: make sure you've applied the latest BIOS and
EC updates for the T23 model you have first; if you're still seeing ACPI
errors/warnings after that, maybe post them to the mobile or acpi list.
Searching the archives of either list for T23 should provide some clues.

My T23's BIOS and EC aren't up to date, I get a subset of your list of
ACPI messages (apparently harmlessly) but nothing like as many as you.

Adding acpi_ibm_load="YES" to /boot/loader.conf is a good start.

Cheers, Ian

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


Re: normal mount points

2007-04-29 Thread Ian Smith
On Sun, 29 Apr 2007 00:17:30 -0700 Graham North <[EMAIL PROTECTED]> wrote:

 > I believe that they are mount points, not directories.   I shut the 
 > server down last night until I learn more.

Mount points are directories, but whether these particular directories
have been used as mountpoints or are just (empty?) leftovers from some
process at some time might be illustrated by running 'ls -lartT /' or
'ls -la /net /host' to see in context when these were last modified,
and whether both have around the same timestamps .. maybe a clue there?

Couldn't hurt to run security/chkrootkit, though it can false positive.

As Chris said:

 > > What is the contents of these directories?

and:

 > Just for reference a file system is mounted to a directory.  Before
 > anyone can answer your question about what these could be, some more
 > information would be very helpful, such as the contents of /net and
 > /host, the output of `mount` and the contents of /etc/fstab.
 > 
 > Hopefully then we can help further.  Thanks!
 > 
 > - --
 > Chris Slothouber ([EMAIL PROTECTED]) -=- Mercenary Sysadmin

Cheers, Ian

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


Re: Apache and PHP Packages

2007-04-23 Thread Ian Smith
On Mon, 23 Apr 2007 08:56:04 +0200 Peter Ankerst?l <[EMAIL PROTECTED]> wrote:
 > Stephen Willson wrote:
 > > I have installed the latest Apache and PHP Packages. I can get
 > > Apache working, but nothing is standing out as to why I can't get
 > > the PHP package to work. Best I can figure is that this package was
 > > compiled without the options to include apache support. -or- there
 > > is another package that adds support for apache 2.2.3
 > > 
 > > i installed:
 > > 
 > > php5-5.1.6_3
 > > apache-2.2.3
 > > 
 > > (and dependencies).
 > > 
 > > can't figure it out. i haven't installed /compiled with FreeBSD in
 > > a long time so I thought the packages would be easy enough... 
 >
 > I dont know whether or not the php-package are built with the apache module 
 > but 
 > have you configured your apache correctly? have you added
 > AddType application/x-httpd-php .php
 > AddType application/x-httpd-php-source .phps
 > 
 > to your apache conf?
 > 
 > My suggestion would be to compile the packages from the ports-collection to 
 > make 
 > sure the module is compiled and then make sure that the webserver is 
 > configured 
 > properly.
 > 
 > You can read about the ports collection and how to use it here:
 > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports.html
 > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html

Unless it's changed quite recently (always possible), installing PHP5
from a package does not get you mod_php5 / libphp5.so, unlike PHP4.

As packages are built with default options, and as building the apache
module is not enabled by default (without/before running make config),
you now HAVE to use the port for PHP5, selecting the module in config.

I don't know why this became the default, assuming the majority of
php users are installing it for the apache module, but there it is. 

Cheers, Ian

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


External touchpad for a laptop?

2007-04-01 Thread Ian Smith
Can anybody spare me a clue?

-- Forwarded message --
Date: Thu, 12 Oct 2006 02:58:32 +1000 (EST)
From: Ian Smith <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: External touchpad?

Hi,

running a Thinkpad T23 on 6.1-RELEASE.  Happy but for the 'stickmouse',
finding it tediously unproductive after using a nice touchpad for years. 

Does anyone know of a usable compact external touchpad?  The Cirque Easy
Cat (http://www.cirque.com/cpages/?page=24) looks about the useful size,
but Google has so far let me down regarding whether this might work with
FreeBSD, PS/2 or USB.  It seems to be a successor to the ALPS Glidepoint
(too chunky, serial only) which has long been listed as supported.

Or are there any others?  Thanks in advance for any tips,

Cheers, Ian

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

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


Re: Mounting NTFS drive/partition

2007-03-31 Thread Ian Smith
On Fri, 30 Mar 2007 18:54:13 +0200 " Ivan Zenzerovi? " <[EMAIL PROTECTED]> 
wrote:

 > Ok, I think I understand, but tell me, is there any way I can read those
 > partitions from freebsd? If this helps, on that disk are no windows, there
 > are 3 ntfs partitions.
 > 
 > Ivan
 > 
 > On 3/30/07, Derek Ragona <[EMAIL PROTECTED]> wrote:
 > >
 > >  You are able to mount the primary partition, not the extended
 > > partitions.  This is a also a limitation mounting ms-dos fat drives.  The
 > > extended partitions are done differently and are outside the partition
 > > table.

I'm surprised if there's any problem mounting either msdosfs or ntfs
'drives' in 'extended partitions' nowadays?  There certainly wasn't in
FreeBSD 4.x, when I managed to get mount_hpfs going to salvage a number
of HPFS 'drives', all of which lived in the 'extended partition'. 

The HPFS code (still in the source tree last I checked, but not compiled
by default) was written by Semen Ustimenko <[EMAIL PROTECTED]>, who
also wrote the (then) NTFS code; the two shared lots of cut-n-paste.

It's true that information on this is a bit sketchy and harder to find,
but basically an 'extended partition' (in DOS parlance) uses one of the
four slices on a disk, for example let's say ad0s2, and the separate
'drives' that might appear as D:, E:, etc to DOS/'doze would be then
accessed as ad0s5, ad0s6 etc. 

 > > At 07:58 AM 3/30/2007, =?ISO-8859-2?Q?Ivan_Zenzerovi=E6?= wrote:
 > >
 > > Hi,
 > >
 > > I'm trying to mount an ntfs drive with mount_ntfs. Now, the system sees
 > > the
 > > second hard disk, but shows only one partition, ad1s1 wich is NTFS, but on
 > > that disk there are 3 ntfs partitions and the system doesn't see them. On
 > > windows they work fine.

Try mount_ntfs using ad1s5, ad1s6 and ad1s7 then, read-only for safety.

>From a 2004 fstab on one 4.10 system:
/dev/ad2s5  /hpfs   hpfsro,noauto   0 0

Cheers, Ian

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


Re: Moving paritions around

2007-03-30 Thread Ian Smith
On 30 Mar 2007 02:50:31 - John Levine <[EMAIL PROTECTED]> wrote:

 > I set up my laptop to dual boot between [EMAIL PROTECTED] and FreeBSD.  When 
 > I
 > first set it up I made the partitions the same size, but since then I
 > found I do a lot more with FreeBSD so I'd rather give it more space.
 > 
 > So the last time I had to reinstall Windows from scratch, I made its
 > partition smaller.  Now there's a big chunk of free space between
 > the two partitions.  Should I expect the following to work?
 > 
 > (back everything up, duh)
 > 
 > Boot from a CD, change the partition table to make the FreeBSD partition
 > start right after the Windows partition
 > 
 > Use dd to move down the existing FreeBSD partition data so it starts
 > at the beginning of the new partition
 > 
 > Use growfs to give the extra space to my /usr filesystem, which is at
 > the end of the existing partition

That all sounds a bit scary, and I don't know if it might work.

 > Or should I just back it all up to a USB disk, reformat, and restore it,
 > which will take considerably longer?

You could, or you could do as Garrett suggested, but what I'd likely do
(have done) in the same situation is to make a new FreeBSD slice with
fdisk, occupying the area you've freed above the 'doze slice, and mount
it on, say, /data.  Or you could mount it on say /usr/data, whatever. 

One caveat: if you use sysinstall to setup the fdisk/newfs/labeling of a
new slice that's _before_ your boot slice, be sure to write your changes
and bail out of sysinstall before it thinks you want to install there :) 

Cheers, Ian

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


[OT] Re: TCP conection problems IBM VM -> FreeBSD

2007-03-25 Thread Ian Smith
On Sat, 24 Mar 2007 07:40:50 -0400 Richard reckons:
[..]
 >  Then I started thinking (always a fruitless endeavor), why would a *BSD
 > based firewall/"IP stack" drop the corresponding SYN-ACK when it was
 > activated?  And that thought just fucking bugged me to no end.  I could
 > accept some crazy IBM "IP stack" not dealing with *BSD, but this was
 > *BSD box to *BSD box on the return path that dropped the packet. Also,
 > according to the original poster bang.swox.se has no problems
 > communicating with other systems and he has no problems communicating to
 > vm.se.lsoft.com.

I can't help with the Real Problem here, hence Subject change, but ..

[..]
 >  ** After looking through "Stevens TCP/IP Illustrated" I can find no
 > reference to what sequence number a RST packet should have if a SYN-ACK
 > precedes it.  I'm unsure whether the RST should ACK the SYN + 1, as a
 > SYN consumes a byte in normal operation, or return the ISN to the
 > sending host. But as sending a RST in response to a SYN-ACK is not
 > normal operation; such ambiguities would likely be left to the
 > programmers discretion.  In this case IBM not a stack derived from *BSD.

Secondly, the IBM TCP/IP stack and most userland network utilities were
declaredly BSD-derived at least through the '90s OS/2 times - and likely
much earlier, but I've not played with an IBM mainframe since '73 :)

But firstly, I wonder why you'd expect IBM to run 'some crazy' stack?

 > this now opens a whole new box of worms?!?!?

Hopefully not ..

Cheers, Ian

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


Re: 'nodump' on directories: new contents still dumped

2007-03-19 Thread Ian Smith
On Mon, 19 Mar 2007 12:35:25 + Alex Zbyslaw writes:

 > Bram Schoenmakers wrote:
 > 
 > >Op vrijdag 16 maart 2007, schreef Alex Zbyslaw:
 > >  
 > >
 > >>Can you try explicitly putting a "-h 0" into your incremental command
 > >>line and see if that makes a difference?
 > >>
 > >>
 > >
 > >I've done that and now dump behaves like it should. I don't understand why, 
 > >because the man page says that -h 1 is default (and shouldn't be supplied 
 > >then). But with -h 0 on every incremental dump it's OK now.

My reading of the man doesn't suggest that -h "shouldn't be supplied
then", ie that -h 1 is only the default *iff* you supply -h at all, not
that -h 1 is default if you don't mention -h .. but I could be mistaken!

 > I can only think of two possibilities:
 > 
 > 1) There is a bug in whatever version of FreeBSD you are running and 
 > -h 1 is somehow *not* the default.  6.2 Release?
 > 
 > 2) There is some kind of bug with your command line, but without 
 > seeing it, I can't tell.
 > 
 > Glad you got the problem worked around;  when I finally get around to 
 > 6.2 I will be curious to see if I can replicate the problem.

Or perhaps it only requires clarification / better phrasing in the man? 

Cheers, Ian

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


Re: Corrupted OS

2007-03-17 Thread Ian Smith
On Sat, 17 Mar 2007 13:09:12 -0700 Garrett Cooper wrote:
 > Drew Jenkins wrote:
 > > /etc/fstab says ufs. Is there a better way to check if its ufs2?
 > > Drew2
 > > 
 > > Garrett Cooper <[EMAIL PROTECTED]> wrote: On Mar 16, 2007, at 7:34 PM, 
 > > Drew Jenkins wrote:
 > > 
 > >> How large is "large"? Why filesystem are you using with what  
 > >> options?The MySQL database was just under a gigabyte, and the Zope  
 > >> Data.fs file/database was somewhere under 2 gigabytes. Options? No  
 > >> options. I had symlinks from where these dbases were supposed to  
 > >> live on the SCSI drives to the 500 GB drive. Then suddenly, poof!  
 > >> They were gone.
 > >> Drew
 > > 
 > > Well, I was curious because I thought it could be something to deal  
 > > with the 2GB file limit. You still haven't answered my question about  
 > > the filesystem though: are you using UFS2 or something else?
 > > 
 > > Thanks,
 > > -Garrett
 > 
 > The easiest way to figure out if you're running UFS2 is to go to the 
 > disk label feature within sysinstall, and define a mount point for the 
 > slice. Make sure _not_ to make any changes though as you'll be thrusting 
 > yourself in the middle of a system upgrade (CTRL-C is your friend).

Perhaps even a bit easier:

paqi% dumpfs /dev/ad0s2a | head -1
magic   19540119 (UFS2) timeSun Mar 18 15:48:35 2007

Also, 'dumpfs  | head -20' provides far more than anyone wants
to know but including maxfilesize, flags (eg none or soft-updates) and
fsmnt (last mounted on).  Works on unmounted or mounted drives.

Cheers, Ian

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


Re: Effectively detaching 'less' from a pipe

2007-02-27 Thread Ian Smith
In freebsd-questions Digest, Vol 167, Issue 5
At Message: 19
On Mon, 26 Feb 2007 20:27:41 -0700, Kelly Jones <[EMAIL PROTECTED]> wrote:

 > I often run commands piped to 'less', to make sure the command is
 > working OK by looking at the first few lines of output.
 > 
 > Once I'm convinced, though, I'd like to "get rid" of less, and just
 > have the rest of stdout spewed to the terminal (and/or /dev/null
 > and/or to a file I specify).
 > 
 > In other words, I want to stop hitting 'space' until my program terminates.

What Matthew said about using 'F' to follow output tail is very handy. 

 > How can I do this?
 > 
 > My current kludges (both ugly):
 > 
 > 1. do "command > file" and then "tail -f file | less" (this mostly
 > works, but takes a while to get started because of buffering issues)
 > 
 > 2. do "command | less", and once I'm happy w/ the output, hit 'q' to
 > quit less (and thus terminate program) and then do "command >
 > /dev/null" (works, but wastes time, since I have to run the command
 > once just to look at the first few lines and then abort it)

When you've piped something to less that you want to save, or save some
part of, press 'g' to go to top of file (or position the top of what you
want to save at top of screen), press 'm' and some letter (I mostly use
'mm' for speed) to mark that spot, press 'G' to go to bottom of file (or
otherwise position the end of what you want at bottom of screen), then
press '|' then (as prompted for) the letter of your mark (eg here '|m')

Then at the '!' command prompt offered, type 'cat - >somepath/filename'
to capture the file, or snippet.  If you use >> instead of > you can cat
interesting sections of your output to a file; using up/down arrow at
'!' you can recall commands used, for each mark/move/pipe/cat sequence.

Cheers, Ian

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


Re: input/output error on hd

2007-02-25 Thread Ian Smith
On Sun, 25 Feb 2007, Jerry McAllister wrote:
 > On Sun, Feb 25, 2007 at 10:38:01AM -0500, Marty Landman wrote:
 > 
 > > On 2/24/07, Jerry McAllister <[EMAIL PROTECTED]> wrote:
 > > >
 > > >
 > > >Well, I think you are past any label problems now and on to the
 > > >bad sectors and/or finding superbocks.Although I am not quite clear
 > > >from above what resulted in the 'INCOMPLETE LABEL...'  message.
 > > 
 > > 
 > > Ok then, can you point me to somewhere that can learn about superblocks and
 > > give me an idea of what to do next? 
 > 
 > Most of what I figured out several years ago (and have essentially
 > forgotten since) came from the handbook and something I found by
 > searching the web that gave the layout of blocks and chains.  I would
 > have to go back searching again.

Failing someone who actually knows what they're talking about re UFS
structures chipping in to this discussion, all I can offer in addition
is what my own exploration of manuals and a bit of googling turned up .. 

Firstly, Marty, you should run dumpfs(8) on your ad1s1a.  With the -m
switch, this produces a single line suitable for feeding into newfs with
all parameters, and is probably worth saving for all slices in case of
any subsequent emergencies.  I've just done that for mine, anyway, along
with fdisk and boot0cfg -v output, and bsdlabel output for UFS slices. 

Without the -m switch, feed the output to a file, or less, as it's very
voluminous.  For a 240GB drive, it'll likely be huge.  However the data
at the head is probably what's needed, though I can't make much of it.

This post by Ian Dowse explains how to compute where the superblocks
are, for a quoted example dumpfs: http://noc.caravan.ru/faq/SBLOCK.html

Note however that Ian is talking about UFS1 (where the superblock offset
was 32) but if you consult fsck_ffs(8) you'll see (under -b) that for
UFS2, which you almost certainly would have used, it's at 140 .. I
gather that's the offset from the start of each cylinder group?


 > >   Also assuming my bad sectors really are
 > > totally bad, wouldn't fsck allow me to mark them as unusable and move on?
 > 
 > No, fsck does not do that.   Marking blocks bad happend below the
 > level of the OS - generally in the disk controller itself.   It remaps
 > sectors until it runs out of spares and when it runs out, it starts
 > reporting unrecoverable errors.   This is not even reported to the OS
 > until it runs out of spares.
 > 
 > The only thing you can do with those bad sectors is to try and figure 
 > out if any of them are superblocks.  If they are, you can probably
 > rebuild it from other superblock clones.   If it is not, it is probably
 > lost data.  In that case try to overwrite the bad sector.  If that 
 > works, then the sector itself is OK, but the data that was there is
 > gone.   If it doesn't work, then it is bad and there is a good chance
 > that more than data got nuked in the power failure - eg, it damaged
 > the disk or controller in some way.

Seeing if fsck_ffs will use any discovered alternate superblocks would
be the first step, and if so, whether that helps to get it mounted.  I'd
certainly be careful to mount it read-only before trying data recovery! 

Since Marty has already been bravely using dd :) rewriting those sectors
should be easy enough, bearing in mind the apparent off-by-one numbering
difference between the sectors dd found bad and those fsck reported bad.

 > But, the next thing seems to be learning about how to follow the file
 > chains and how to find and read and write superblocks.  Alternatively
 > you can decide it isn't worth the effort to recover and try and write
 > over the drive completely - just totally trash it - and see if those
 > bad sectors will write.  If you did that, then you would have to rebuild 
 > the slice and partition table and do a newfs before you could again
 > use the drive and everything previously on it would be lost.

Well if a dd rewriting those specific contiguous sectors failed, I doubt
that newfs would do any better, so the dd is definitely worth a try, but
I wouldn't write anything further to the fs until all else has failed.

 > Good luck.

I can only echo that, again.

 > Maybe someone who has some experience in tracking file chains can
 > respond and give you more helpp than can I.

Ditto for that .. I'm now very thoroughly out of my depth here, though
I've learned a few new things through the exercise. 

Maybe mailing Ian Dowse with circumstances and the dumpfs head might be
worth a try, Marty?  See the website committers' page for his address.

Cheers, Ian

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


Re: input/output error on hd

2007-02-23 Thread Ian Smith
On Fri, 23 Feb 2007, Jerry McAllister wrote:

Jerry, just on a couple of points:

Me to Marty:
 > > Does the above result mean that my boot sector is ok?
 > 
 > I think maybe you might be getting some of your terminology shuffled 
 > around.Your boot sector is not at question here.   It doesn't
 > affect the ability to read the disk partition.

I was talking about sector 0 on ad1.  If the disk were bootable it would
be the 'boot sector', but it's not bootable.  It still contains the DOS
partition table though.  boot0cfg -v  shows this info too.

 > Secondly, it looks like the slice table - which is what fdisk mucks
 > with - is OK.  

Luckily .. though with only one slice on the disk, easily recreatable.

 > What seems to be messed up is either the slice 1 label which contains
 > the partition table.   In fact, with one of your postings, it looked
 > like it thinks it is slice 4, but I don't remember what you did to
 > get that.   

Try 'fdisk ad0sY' where Y is any freebsd slice, and you'll get that (or
at least, I do on both my ad0 freebsd slices).  Maybe fdisk should barf
or at least whinge rather than reporting the first sector of any slice
specified as if it were a sector 0 / MBR / boot sector?

 > If none of this helps at all, then the problem is past the label and
 > in to the filesystem structure itself.   Then I think you are stuck with 
 > tracing superblocks as I pointed out before.   That is going to take some 
 > study but it might work.

Yep, it depends on how precious this data is, but no learning is wasted.

Cheers, Ian

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


Re: input/output error on hd

2007-02-23 Thread Ian Smith
On Fri, 23 Feb 2007, Marty Landman wrote:
 > On 2/23/07, Ian Smith <[EMAIL PROTECTED]> wrote:
 > 
 > So just show 'fdisk ad1' to see the disk's partition (slice) table (which
 > > may be damaged, but it's the only one you're interested in).
 > 
 > %sudo fdisk ad1
 > *** Working on device /dev/ad1 ***
 > parameters extracted from in-core disklabel are:
 > cylinders=486344 heads=16 sectors/track=63 (1008 blks/cyl)
 > 
 > Figures below won't work with BIOS for partitions not in cyl 1
 > parameters to be used for BIOS calculations are:
 > cylinders=486344 heads=16 sectors/track=63 (1008 blks/cyl)
 > 
 > Media sector size is 512
 > Warning: BIOS sector numbering starts with sector 1
 > Information from DOS bootblock is:
 > The data for partition 1 is:
 > sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
 > start 63, size 490223412 (239366 Meg), flag 80 (active)
 > beg: cyl 0/ head 1/ sector 1;
 > end: cyl 1023/ head 254/ sector 63
 > The data for partition 2 is:
 > 
 > The data for partition 3 is:
 > 
 > The data for partition 4 is:
 > 
 > %

Ok, that looks right, doing the maths on cyl x heads x s/tk x 512 bytes.

 > If 'fdisk ad1' isn't showing any sensible data for 'partition 1' (ad1s1)
 > > then your boot sector is hosed.
 > 
 > 
 > Does the above result mean that my boot sector is ok?

Looks like.  By 'boot sector' here we're talking about sector 0 on ad1,
which while it isn't your real boot sector (that's on ad0), it is where
the ad1 partition table is stored, and is what fdisk is looking at here.
It's also what 'boot0cfg -v ad1' should show you, re the slicing.

I should mention here that I've read Jerry's reply, and (digging through
the latest freebsd-questions digest) your reply to him, but you left me
out of the ccs.  I keep hearing that gmail makes doing proper followups
difficult; you may have to make an extra effort to keep everybody cc'd.

 > > %sudo fsck /dev/ad1cs1
 > > > fsck: Could not determine filesystem type
 > > > %sudo fsck /dev/ad1c
 > > > fsck: exec fsck_unused for /dev/ad1c in /sbin:/usr/sbin: No such file or
 > > > directory
 > >
 > > You shouldn't be doing any of this with the 'c' partition, which is meant
 > > to cover the whole disk, but doesn't describe any of its slices.
 > 
 > Unfortunately I had incorrectly been using ad1s1c for this disk, is there
 > anything I can do about it now? Would that help with the effort to recover
 > the data?

What we seem to be unsure of is how the disk was originally partitioned. 

Normally if you'd used sysinstall to allocate the entire second disk to
a single freebsd slice, it would have showed up as (possibly) ad1s1a or
(more likely) as ad1s1d, going on what happens to non-bootable freebsd
slices here.  In any case, you need to construct a good label for it. 

 > I gather you think your data should be on ad1s1.  Does 'bsdlabel ad1s1' say
 > > anything sensible?
 > 
 >  %sudo bsdlabel ad1s1
 > # /dev/ad1s1:
 > 8 partitions:
 > #size   offsetfstype   [fsize bsize bps/cpg]
 >   c: 4902234120unused0 0 # "raw" part, don't 
 > edit

Ok, apart from not having an a or d or whatever partition, it looks ok.

 > As you mentioned elsewhere, you appear to have a bunch of bad blocks early
 > > on this disk.
 > 
 > Yes, based on working with the dd cmd on /dev/ad1s1 and playing with the
 > skip parm have found that blocks 129-144 give input/output errors. Does this
 > indicate a hardware error necessarily? This problem came about as the result
 > of a power outage; might there "just" be hosed data on those sectors?

Not to get your hopes up too high, but yes it's possible to hose a bunch
of sectors, especially on a power outage at a bad moment, without there
being any physical damage, so yes these might come good when re-written.
I had exactly that happen to a 15GB IBM drive, which newfs fixed ok,
after I'd spent ages getting what was recoverable off it.

However it depends on what was on those sectors, and from the numbers at
63 sectors/track, they could be superblock &/or root directory sectors,
which likely spells difficulty for recovery. 

 > Have you a spare drive you can dd this one to, in its current state?
 > 
 > No, it's a 250GB drive, the largest on my LAN. Would have to buy a
 > replacement drive and then dd to that. If it came to that, while a backup hd
 > might be a good idea, I'd possibly just live with recreating the data
 > instead.

Well I'd at least try getting a copy of the first few some tens of megs,
whatever you can affo

Re: input/output error on hd

2007-02-22 Thread Ian Smith
In freebsd-questions Digest, Vol 166, Issue 12
At Message: 15
On Thu, 22 Feb 2007 18:12:48 -0500 Marty Landman <[EMAIL PROTECTED]> wrote:

 > Thanks Derek,
 > 
 > I tried deleting and recreating the one slice on that drive in sysinstall,
 > also rewriting the boot label. Didn't seem to help as shown:

It's hard to guess if you don't show us the precise commands you issued,
or at least the data you gave to sysinstall, and what you got back.

 > %sudo fdisk ad1cs1
 > *** Working on device /dev/ad1cs1 ***
 > parameters extracted from in-core disklabel are:
 > cylinders=486332 heads=16 sectors/track=63 (1008 blks/cyl)
 > 
 > Figures below won't work with BIOS for partitions not in cyl 1
 > parameters to be used for BIOS calculations are:
 > cylinders=486332 heads=16 sectors/track=63 (1008 blks/cyl)
 > 
 > Media sector size is 512
 > Warning: BIOS sector numbering starts with sector 1
 > Information from DOS bootblock is:
 > The data for partition 1 is:
 > 
 > The data for partition 2 is:
 > 
 > The data for partition 3 is:
 > 
 > The data for partition 4 is:
 > sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
 > start 0, size 5 (24 Meg), flag 80 (active)
 > beg: cyl 0/ head 0/ sector 1;
 > end: cyl 1023/ head 254/ sector 63

Apart from the fact that 'ad1cs1' is a nonsense, fdisk run on slices
always shows garbage, in this case indicating that only slice 4 is in
use, with a nonsense size.  In fact, I get _exactly_ your above rubbish
partition report from running 'fdisk ad0s4' or 'fdisk ad0s2' - both of
which are FreeBSD slices - and other types of rubbish on ad0s1 (DOS) and
ad0s3 (different DOS) .. fdisk just blindly reports what it finds in
binary, scarcely checking for consistency.

'fdisk ad0' (here) shows the Right Stuff.  So just show 'fdisk ad1' to
see the disk's partition (slice) table (which may be damaged, but it's
the only one you're interested in).  If 'fdisk ad1' isn't showing any
sensible data for 'partition 1' (ad1s1) then your boot sector is hosed. 

 > %sudo fsck /dev/ad1cs1
 > fsck: Could not determine filesystem type
 > %sudo fsck /dev/ad1c
 > fsck: exec fsck_unused for /dev/ad1c in /sbin:/usr/sbin: No such file or
 > directory

You shouldn't be doing any of this with the 'c' partition, which is
meant to cover the whole disk, but doesn't describe any of its slices.

I gather you think your data should be on ad1s1.  Does 'bsdlabel ad1s1'
say anything sensible?  If not, does bsdlabel ad1s2, ad1s3 or ad1s4, if
fdisk ad1 shows anything in s2, s3 or s4.

I wouldn't be running fsck (without the -n switch) or bsdlabel (with the
-e switch) until you're pretty sure of what's going on where - though I
gather it's a bit late for that sort of advice :(

 > %sudo mount /dev/ad1cs1 /hoss
 > mount: /dev/ad1cs1: Input/output error
 > %sudo mount /dev/ad1c /hoss
 > mount: /dev/ad1c on /hoss: incorrect super block
 > %sudo dd if=/dev/ad1s1 of=/tmp/scratch bs=512 count=1 skip=131
 > dd: /dev/ad1s1: Input/output error
 > 0+0 records in
 > 0+0 records out
 > 0 bytes transferred in 1.199710 secs (0 bytes/sec)

As you mentioned elsewhere, you appear to have a bunch of bad blocks
early on this disk.  They may or may not be critical to recovering the
rest of your data, but with all this experimental poking around, things
don't look too good.

Have you a spare drive you can dd this one to, in its current state? 

 > %sudo dd if=/dev/ad1s1 of=/tmp/scratch bs=512 count=1 skip=127
 > 1+0 records in
 > 1+0 records out
 > 512 bytes transferred in 0.018295 secs (27986 bytes/sec)
 > %sudo dd if=/dev/ad1s1 of=/tmp/scratch bs=512 count=1 skip=144
 > 1+0 records in
 > 1+0 records out
 > 512 bytes transferred in 0.024593 secs (20819 bytes/sec)
 > %sudo dd if=/dev/ad1s1 of=/tmp/scratch bs=512 count=1 skip=143
 > dd: /dev/ad1s1: Input/output error
 > 0+0 records in
 > 0+0 records out
 > 0 bytes transferred in 1.319451 secs (0 bytes/sec)
 > %
 > 
 > Wonder why it renamed my slice from ad1s1c to ad1cs1, and what I can do from
 > here.

Which 'it' do you mean?  ad1cs1 makes no sense at all, and ad1s1c you
shouldn't usually be messing with at all (as it says, don't edit).

What does 'ls -l /dev/ad1*' have to say?

And please don't top-post ..

 > Marty
 > 
 > On 2/22/07, Derek Ragona <[EMAIL PROTECTED]> wrote:
 > >
 > >  You may have lost the partition table.  You can try repartitioning the
 > > drive but do NOT do a newfs.  You can easily try it in sysinstall.
 > >
 > > -Derek

Yes, if you know precisely how the disk was partitioned before, which is
perhaps dubious in this case .. hopefully Marty saved a copy of the boot
sector for each disk earlier with boot0cfg -f ?

Marty, if you don't mind reposting what I suppose you did earlier, show
us these (all non-destructive): 

# fdisk ad1
# bsdlabel ad1s1(or whatever slice 1-4 it may be, or try them all)
# boot0cfg -v ad1

Cheers, Ian

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mai

Re: ipfw limit src-addr woes

2007-02-22 Thread Ian Smith
On Wed, 21 Feb 2007, Julian Elischer wrote:
 > Ian Smith wrote:
 > > On Tue, 20 Feb 2007, Julian Elischer wrote:
 > >  > admin wrote:
 > >  > 
 > >  > > Wrong: the implied "check-state" done by the "limit" lets the 
 > > connection 
 > >  > > through (i.e. performs the action) iff there's state recorded for it 
 > >  > > (src-addr+src-port+dst-addr+dst-port). If however it's a SYN packet 
 > >  > > incoming and the number of current states is trying to cross the 
 > > limit, 
 > >  > > the SYN packet is implicitly dropped and the search terminates.
 > >  > > 
 > >  > > This is not to say that I completely understand the things going on 
 > > when 
 > >  > > the connections start building up (different timeouts?) but the above 
 > >  > > conclusion is based on what simulation has shown. The whole ruleset 
 > > fits 
 > >  > > on one screen, there's an "allow ip from any to any" in the end, so 
 > > I'm 
 > >  > > pretty sure I'm not crazy :-)
 > >  > 
 > >  > One thing to keep in mind is that a 'check-state' rule works by 
 > > effectively 
 > >  > jumping to the rule that did the 'keep-state' and re-executing it..
 > >  > (and incrementing its stats).
 > > 
 > > What if the action of the rule that does the 'keep-state' (here a limit
 > > src-addr) is a skipto, rather than an allow / fwd / divert etc rule that
 > > would terminate the search?  Does 're-executing' here imply anything
 > > about whether the skipto's conditional branch is or is not taken?
 > 
 > if the keep-state rule is a skipto then the check-state will skip to..
 > I use that in some rules.
 > 
 > here's a snippet that I have when acting as a filtering transparent bridge,
 > with DNS replies (from the outside) being diverted to a snooper.
 > The bridge is between em2 (inside) and em3 (outside).
 > 
 > 01200  17588453  1257728932 skipto 1210 udp from any to any dst-port 53 recv 
 > em2
 > 01201  16192860  2721432229 skipto 1220 udp from any 53 to any recv em3
 > 01202  43658738 21537916245 skipto 1250 ip from any to any
 > 01210  34023270  3994649771 skipto 1240 ip from any to any keep-state
 > 01220 0   0 check-state
 > 01229  2364  441701 deny ip from any to any
 > 01240  16190496  2720990528 divert 5001 udp from any 53 to any recv em3
 > 01242  17832774  1273659243 deny ip from any to any
 > 
 > (note this requires patches  to allow divert from a bridge.)
 > It's convoluted I know but it only (well, mostly) diverts packets from 
 > the outside that are part of a conversation that was started already 
 > (probably by a dns request from inside) DNS packets from the outside 
 > that are not a response to something we already asked for are discarded 
 > (a DOS protection)
 >
 > note that all the packets that went to the check-state, (1220) ended up
 > going back to 1210 where they did the skipto 1240 and were filtered again.

Thanks Julian, great illustration!  After much chewing I've got most of
the marrow, but have buried this bone where I can dig it up again (woof) 

Re admin's issue, I notice that the em3 packets failing check-state
still require denying at 1229, such that p(kts)1201 - p1229 = p1240. 

Do you have any earlier rules jumping into here too, as the 1210 packet
counts don't quite add up; ie p1210 > (p1200 + p1240) by ~244k packets?

Re 1242, are these (mostly) diverted packets reentering the firewall? 
After snooping, how do the clients get their DNS replies if they're
denied here, or does your divert code reinsert those elsewhere?  And
where do the then ~1.2M extra denied packets denied here come from?

Cheers, Ian

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


Re: ipfw limit src-addr woes

2007-02-20 Thread Ian Smith
On Tue, 20 Feb 2007, Julian Elischer wrote:
 > admin wrote:
 > 
 > > Wrong: the implied "check-state" done by the "limit" lets the connection 
 > > through (i.e. performs the action) iff there's state recorded for it 
 > > (src-addr+src-port+dst-addr+dst-port). If however it's a SYN packet 
 > > incoming and the number of current states is trying to cross the limit, 
 > > the SYN packet is implicitly dropped and the search terminates.
 > > 
 > > This is not to say that I completely understand the things going on when 
 > > the connections start building up (different timeouts?) but the above 
 > > conclusion is based on what simulation has shown. The whole ruleset fits 
 > > on one screen, there's an "allow ip from any to any" in the end, so I'm 
 > > pretty sure I'm not crazy :-)
 > 
 > One thing to keep in mind is that a 'check-state' rule works by effectively 
 > jumping to the rule that did the 'keep-state' and re-executing it..
 > (and incrementing its stats).

What if the action of the rule that does the 'keep-state' (here a limit
src-addr) is a skipto, rather than an allow / fwd / divert etc rule that
would terminate the search?  Does 're-executing' here imply anything
about whether the skipto's conditional branch is or is not taken?

I bought into this because admin said that more connections were being
allowed than the limit src-addr clause should allow, and I assumed that
the skipto branch was not being taken on over-limit packets, and that
the following fwd rule (allowing any type of packets including SYN) was
being executed, which would account for what he'd said was happening.

admin above asserts that my assumption was wrong, and that in a match
beyond the limit number of connections for that src/dest address, the
setup packet is 'implicitly dropped and the search terminates', and
while I can't find that stated as such in ipfw(8), he may be right.

Which still doesn't explain why connections from a particular IP beyond
his specified limit are allowed to be established, as originally stated.

[shrug]  Over to the ipfw gurus.

Cheers, Ian

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


Re: ipfw limit src-addr woes

2007-02-19 Thread Ian Smith
On Mon, 19 Feb 2007, admin wrote:
 > Ian Smith wrote:
 > > On Mon, 19 Feb 2007, admin wrote:
 > >  > Andre Santos wrote:
 > >  > > On 2/18/07, admin <[EMAIL PROTECTED]> wrote:
 > >  > > 
 > >  > >> Hi, I'm trying to use ipfw's limit clause to limit the number of
 > >  > >> connections a single IP can have at the same time in a transparent
 > >  > >> web-proxy environment:
 > >  > >>
 > >  > >> 00350 skipto 401 tcp from x.x.x.x/x,y.y.y.y/y,z.z.z.z/z to any 
 > > dst-port
 > >  > >> 80 in via if0 setup limit src-addr 10
 > >  > >> 00401 fwd local.ip.ad.dr,8080 tcp from x.x.x.x/x to any dst-port 80
 > >  > >> ... the rest fwd...
 > >  > >>
 > >  > >> as I understand the manpage, when the current number of connectiions 
 > > is
 > >  > >> below 10, the action "skipto" is performed, else, the packet is 
 > > dropped
 > >  > >> and the search terminates. But...
 > > 
 > > No, a packet is not dropped on a condition that fails a skipto test. 
 > > 
 > The manpage doesn't make this point clear.

You pretty much have to read it all .. several times .. a year.  One of
the things you note is that each rule is tested until a packet is either
allowed or denied by a rule, even until '65535 deny ip from any to any'.

 > limit {src-addr | src-port | dst-addr | dst-port} N
 >   The firewall will only allow N connections with the same 
 >   set of parameters as specified in the rule.

Yes, for this rule.  It still needs to be applied to an allow or deny
(or forward, divert etc, anything that terminates the search). 

 >   To limit the number of connections a user can open you can use the 
 > following type of rules:
 > ipfw add allow tcp from my-net/24 to any setup limit src-addr 10
 > ipfw add allow tcp from any to me setup limit src-addr 4

Yes.  Notice that these are allow rules, so the search terminates when
successfully matched.  It is assumed you'll later have rule/s denying
what you've not allowed.  True, this is not stated with every example. 
   
 > I'm assuming the packet gets silently dropped when the limit is 
 > overloaded but gets acted upon otherwise due to the stateful "limit" 
 > behaviour (keep-state in disguise). Just do a "skipto" when there's a 
 > state entry and that's it. And that's why the counter grows for 
 > established connections too, even though there's a "setup" modifier.

Can't tell without seeing your whole ruleset, but now that you know that
the skipto rule has NOT dropped the setup packets that don't match that
rule (including those exceeding the src-addr limit), I suspect you'll
find another rule has allowed them, on some other condition, later on.

 > skipto is a nice thing as it allows you to AND rules ;-)

or to OR, NAND or NOR :)  Reminds one that a ruleset is procedural.

 > Besides, that's what my humble testing came up with - connections over 
 > the limit DO get dropped... if done nicely.
 > 
 > As for the problem, it seems to me that all this noise is because of 
 > different timeouts in ipfw and TCP layer/whatever. The dynamic state 
 > entry for a connection expires while netstat -na still show the 
 > connection as ESTABLISHED, or, worse, the state entry is still there but 
 > the corresponding connection is in some half-closed state (FIN_WAIT_2, 
 > CLOSE_WAIT, LAST_ACK). The first case allows many more connections than 
 > "limit", while the second case won't let many good clients connect due 
 > to their buggy browsers not closing connections and letting the count 
 > build up. Could this be it?

I don't believe so.  They can only have been established in the first
place if the setup packet has been, somewhere in your ruleset, allowed.

Here it seems they're allowed (at least the ones from x.x.x.x/x) by the
fwd at 401 which has no 'setup' constraint, and will fwd both setup AND
established packets from x.x.x.x/x .. other rules, y and z, presumably.

Replaying .. trying not to do quite so much in one rule, but given you
can't just 'allow' here, since you want to run your fwd rules later: 

 > 00350 skipto 401 tcp from x.x.x.x/x,y.y.y.y/y,z.z.z.z/z to any dst-port \
 >   80 in via if0 setup limit src-addr 10

   00350 skipto 370 tcp from ${thatmob} to any dst-port 80 in via if0
   00360 skipto 401 ip from any to any   # bit clunky, but !(all that)

   00370 skipto 401 tcp from any to any setup limit src-addr 10  # goodies
   00380 deny tcp from any to any   # else baddies

 > 00401 fwd local.ip.ad.dr,8080 tcp from x.x.x.x/x to any dst-port 80
 > ... the rest fwd...

FWIW: not only have I never used limit src-addr, but neither forward
with keep-state rules, so I could be talking ${hit} .. caveat bloggor.

Cheers, Ian

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


Re: ipfw limit src-addr woes

2007-02-19 Thread Ian Smith
On Mon, 19 Feb 2007, admin wrote:
 > Andre Santos wrote:
 > > On 2/18/07, admin <[EMAIL PROTECTED]> wrote:
 > > 
 > >> Hi, I'm trying to use ipfw's limit clause to limit the number of
 > >> connections a single IP can have at the same time in a transparent
 > >> web-proxy environment:
 > >>
 > >> 00350 skipto 401 tcp from x.x.x.x/x,y.y.y.y/y,z.z.z.z/z to any dst-port
 > >> 80 in via if0 setup limit src-addr 10
 > >> 00401 fwd local.ip.ad.dr,8080 tcp from x.x.x.x/x to any dst-port 80
 > >> ... the rest fwd...
 > >>
 > >> as I understand the manpage, when the current number of connectiions is
 > >> below 10, the action "skipto" is performed, else, the packet is dropped
 > >> and the search terminates. But...

No, a packet is not dropped on a condition that fails a skipto test. 

 skipto number
 Skip all subsequent rules numbered less than number.  The search
 continues with the first rule numbered number or higher.

You'll need a specific allow or deny rule; skipto does neither, it just
branches to 401 if the condition is matched, otherwise proceeds to the
next rule, which is also 401.  This runs rule 401 and on, either way. 

 > >> the problem is that the src-addr limit is not enforced as some clients
 > >> somehow open a huge number (3-5 times the prescribed value) of
 > >> www-connections to some single address Out There, forcing you to bump up
 > >> certain sysctl variables (such as kern.ipc.nmbclusters,
 > >> kern.ipc.maxsockets, etc.) to mitigate the DOS effects. What might be
 > >> going on? Is ipfw broken, or am I misusing it?

You've misread skipto, is all.  As it stands, the counts will show how
many packets passed the test, but all packets proceed to the next rule. 

I'd rephrase rules to use skipto only for branching on condition, or
!condition, past specific allow and/or deny rules to deal with this. 

 > >> OS: FreeBSD 6.2
 > > 
 > > 
 > > The following command worked here (6.2-RC1). Only one connection was
 > > allowed to 1.2.3.4.
 > > # ipfw add 1 allow tcp from any to 1.2.3.4 22 out via rl1 limit dst-addr 1
 > > 
 > > Use the command "ipfw -d show" to see what connections are matching
 > > your dynamic rules.
 > > 
 > 
 > # ipfw -d show | fgrep x.x.x.x | wc -l
 > 20
 > $ netstat -na|fgrep x.x.x.x|fgrep ESTABLISHED|wc -l
 > 113
 > 
 > Why is it that only 20 connections have been accounted for by ipfw's 
 > dynamic rules but there are actually 113 active connections from that IP 
 > at the moment? The limit src-addr is 75.

See above.  Sorry I didn't notice this when you first posted it.  I've
not yet used limit src-addr myself, but use skipto a lot :)

Cheers, Ian

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


Re: named already running?

2007-02-16 Thread Ian Smith
In freebsd-questions Digest, Vol 165, Issue 19
At Message: 33
On Sat, 17 Feb 2007 00:28:13 +0200 Giorgos Keramidas <[EMAIL PROTECTED]> wrote:

 > On 2007-02-16 22:56, Andrea Venturoli <[EMAIL PROTECTED]> wrote:
 > > Hello.
 > > 
 > > I'm getting this on several different 6.x servers:
 > > 
 > > > # sh /etc/rc.d/named restart
 > > > Stopping named.
 > > > named already running? (pid=xxx).
 > > 
 > > and named won't restart; if I then
 > > 
 > > > # sh /etc/rc.d/named start
 > > > Starting named.
 > > 
 > > it works fine.
 > > 
 > > Is this happening to other people? What could be the reason?
 > > It's nothing critical, only a bit annoying, but I'm curious...
 > 
 > yes.  I've seen it happen too.  I think it's a timing issue between the
 > process going away and the new named trying to start.  I haven't tried
 > to find the *real* cause of this, but it may be worth filing a problem
 > report, even if it's not a critical bug :)

I've run into this one.  /etc/rc.d/named stop runs 'rndc stop' and start
runs first named_precmd which handles the chroot stuff and sets up rndc.

however rndc itself says (edited for relevance):

gaia# rndc
Usage: rndc [-c config] [-s server] [-p port]
[-k key-file ] [-y key] [-V] command

command is one of the following:

  reloadReload configuration file and zones.
[..]
  reconfig  Reload configuration file and new zones only.
  stats Write server statistics to the statistics file.
  querylog  Toggle query logging.
  dumpdb [-all|-cache|-zones] [view ...]
Dump cache(s) to the dump file (named_dump.db).
  stop  Save pending updates to master files and stop the server.
[..]
  statusDisplay status of the server.
  recursing Dump the queries that are currently recursing (named.recursing)
  *restart  Restart the server.<<

* == not yet implemented   <<
Version: 9.3.2-P2

So 'rncd restart' doesn't (yet) work the same as the older ndc restart;
you have to use 'rncd stop; rndc start' instead, or more consistently:

/etc/rc.d/named stop
/etc/rc.d/named start

.. which works fine, but does blow away all cached data :( I have to do
this every time after resuming my suspended laptop, as named loses its
binding to any IP but localhost, after resuming the LAN pccard .. I
guess it can be argued that a nameserver should never be suspended :) 

(As an aside, rndc stats and rndc dumpdb work here, but I can't get rndc
querylog to do anything at all, a write permission error.  I've tried
all manner of things including creating a zero length named.run in
various places under the chroot .. no dice.  I'll try it again after
building the latest 5.5-STABLE, which has bind 9.3.4 as I recall, but I
suspect querylog might need patching to work in a chroot environment)

Cheers, Ian

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


Re: Portsnap and port versions

2007-02-11 Thread Ian Smith
On Sat, 10 Feb 2007 18:22:07 + Robert Inder wrote:

 > I asked for help because I was getting an out-of-date version of
 > portupgrade --- 2.1.3 instead of 2.2.2 --- even though I had usedn
 > portsnap.
 > 
 > > Matthew Seaman writes:
 > > Subject: Re: Portsnap and port versions
 > 
 > :
 > :
 > 
 > > To see if your index is out of date, compare the output of:
 > 
 > > cd /usr/ports
 > > make search name=portindex
 > 
 > > with 
 > 
 > >cd /usr/ports/ports-mgmt/portupgrade
 > >make -V PKGNAME 
 > 
 > BINGO!!!  I was installing sysutils/portupgrade.  
 > 
 > I knew that portupgrade was in sysutils, so I went straight to it and
 > used it...
 > 
 > It didn't occur to me that there might be ANOTHER sysutils somewhere
 > else in the ports tree.
 > 
 > But there was, and the one in ports-mgmt had been updated by
 > portsnap, so when I installed in THERE...

That seems odd, actually.  I did a portsnap fetch then portsnap update
yesterday (albeit for 5-STABLE), which deleted a bunch of moved ports,
including sysutils/portupgrade, as well as adding the ports-mgmt ones.

I did have to do what Matthew and others have suggested, frankly a bit
more helpful to me than the 20070205: clue in /usr/ports/UPDATING ..

# pkgdb -F
# pkg_delete portupgrade-\*
# cd /usr/ports/ports-mgmt/portupgrade
# make install

.. but that was after noticing that pkgdb -F was already whinging that
it couldn't chdir to /usr/ports/sysutils/portupgrade, so I'm surprised
that portsnap fetch plus portsnap update hadn't deleted it for you too? 

 > > Then use portupgrade as usual to upgrade whatever else you want to.
 > Yup!

Cheers, Ian

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


Re: READ_DMA48 error interpretation

2007-02-08 Thread Ian Smith
On Wed, 7 Feb 2007, Richard Lynch wrote:
 > [I've tried to snip away a lot of stuff, without losing any context...]

I'll prune a bit too, but will backtrack to earlier context, so thanks.

 > On Tue, February 6, 2007 2:50 am, Ian Smith wrote:
 > > On Mon, 5 Feb 2007 01:13:31 -0600 (CST) Richard Lynch <[EMAIL PROTECTED]>
 > > wrote:
 > >  > On Tue, January 16, 2007 3:21 pm, Chuck Swiger wrote:
 > >  > > On Jan 16, 2007, at 1:13 PM, Richard Lynch wrote:
 > >  > ...
 > >  > >> +ad1: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=404955007
 > >  > >> +ad1: FAILURE - READ_DMA48 status=51
 > >  > >> error=10
 > >  > >> LBA=404955007
 > >  > >> +g_vfs_done():ad1s1[READ(offset=207336931328, length=16384)]error = 5

Looks like a not ready error maybe.  The only value in your ad1.txt that
looks like it's ever been anywhere near any error threshold is ID# 11,
Calibration_Retry_Count, and its current value is fine.  Power glitch?

Are you getting any other hard looking errors in /var/log/messages?  Is
fsck happy?  It never hurts to run 'fsck -n' whenever you feel the urge.

 > >  > > Try installing the sysutils/smartmontools port and run a drive
 > > self-
 > 
 > >  > I ran the short test on the problem drives, and it said everything
 > > was
 > >  > fine.
 > >  >
 > >  > I'll try the long test at a later date.

Only your ad3.txt referred to below shows a (short) test having been
completed and logged.  You might check the smartctl -a results after
running at least short tests initially (looks like the long ones will
take 4-5 hours for your 4 drives) as Chuck has since suggested.

 > >  > #2. Sequences like this show up a fair amount:
 > >  > Device: /dev/ad2, SMART Prefailure Attribute: 3 Spin_Up_Time
 > > changed
 > >  > from 152 to 153
 > >  > Device: /dev/ad2, SMART Prefailure Attribute: 3 Spin_Up_Time
 > > changed
 > >  > from 153 to 152
 > >  > Device: /dev/ad0, SMART Prefailure Attribute: 8
 > > Seek_Time_Performance
 > >  > changed from 251 to 250

I'm not sure of the degree of logging you're having smartd use here, but
these small changes of value, especially up and down by 1 but a long way
from any error threshold, seem to be excessive and relatively trivial
perhaps debug-level detail?, ie most likely nothing of any concern.

I suggest reading man smartctl under '-A, --attributes' and then you'll
know as much as I do about what these may mean, and maybe worry less ..

 > Here are all the smartctl -a outputs:
 > 
 > http://l-i-e.com/ad0.txt
 > http://l-i-e.com/ad1.txt
 > http://l-i-e.com/ad2.txt
 > http://l-i-e.com/ad3.txt
 > 
 > ad3 is giving the most errors...
 > ad1 gives a fair amount though

Do you mean according to that fine-detail attribute changes logging?  Or
real read/write/seek etc errors being logged to messages?

 > And the ad0 and ad2 seem to be giving the spinup errors.

None of those reports seem to indicate any problems really, though if
anyone else cares to peek and notices any anomalies, I'm all eyes.

As for temperatures, the readings for all 4 drives seem very cool, but
then it is winter over there .. Temperature Celcius for ad0 to ad3 being
36, 27, 22 and 18 degrees C, each present and worst value well clear of
error thresholds .. did you interprete those values as temperatures?

 > ad0 is pretty much full
 > ad1 is the one I'm filling up currently
 > ad2 and ad3 have no actual content on them yet, but will "soon"
 > 
 > All the drives are kind of in an old PC tower (XT? AT???), except the
 > outer casing is, errr, not there...  Just the framework.

Might be worth checking that your power supply is up to handling 4 big
drives, but they weren't running more than mildly warm when reported.

 > ad2 and ad3 are in one of these Thermaltake iCage things:
 > http://www.performance-pcs.com/catalog/index.php?main_page=product_info&cPath=257&products_id=3533
 > which converts the old-school floppy drive[s] bay into an IDE bay, and
 > puts a big honking fan blowing on them.

These too were running nice and cool, 22 and 18C, when reported.  Cf my
40GB laptop drive (at smartctl version 5.36 [i386-portbld-freebsd5.5],
rather more recent than your 5.33 freebsd6.0) this afternoon:

 194 Temperature_Celsius  0x0022  100  100  000   Old_age  Always  -  40 
(Lifetime Min/Max 13/49)

 > I'm not claiming it's "good enough" but I tried.
 > 
 > I left the iCage "bay" between them empty for airflow/cooling.
 > 
 > ad0 and ad1 are in the usual IDE bay of a tower.
 > I have a fan in there, but without the cover to shape the airflow,
 > perhaps th

Re: READ_DMA48 error interpretation

2007-02-06 Thread Ian Smith
In freebsd-questions Digest, Vol 164, Issue 1
At Message: 19
On Mon, 5 Feb 2007 01:13:31 -0600 (CST) Richard Lynch <[EMAIL PROTECTED]> wrote:
 > On Tue, January 16, 2007 3:21 pm, Chuck Swiger wrote:
 > > On Jan 16, 2007, at 1:13 PM, Richard Lynch wrote:
 > >> I know the messages below mean the hard drive or IDE cards are
 > >> having
 > >> problems.  But is this like RED ALERT or more like YELLOW or what?
 > ...
 > >> +ad1: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=404955007
 > >> +ad1: FAILURE - READ_DMA48 status=51
 > >> error=10
 > >> LBA=404955007
 > >> +g_vfs_done():ad1s1[READ(offset=207336931328, length=16384)]error = 5
 > 
 > > If you have current backups, it's a yellow alert.  Otherwise...
 > >
 > >> And what do I do about it?
 > >>
 > >> umount and fsck everything a lot?

Once should do :)  It's possible to have read errors, from a write error
say on unclean power removal, that don't indicate a drive fault at all.

 > >> swap cards/drives around until it stops?
 > >> Ignore it and pray?

The latter is or at least was listed as a backup strategy in the docs :)
 
 > > Try installing the sysutils/smartmontools port and run a drive self-
 > > test.  That will give you a much better assessment of the state of
 > > the drive and whether it is likely to completely fail in the next 24
 > > hours...
 > 
 > I ran the short test on the problem drives, and it said everything was
 > fine.
 > 
 > I'll try the long test at a later date.

Show us the result of 'smartctl -a ' after a test or two.

 > Meanwhile, I turned on the smartd daemon, and am seeing two issues in
 > the logs...
 > 
 > #1. The drive temperatures seem ridiculously high to this naive
 > reader, but what do I know?...
 > 110 to 190 Celcius?  Yikes...  Or maybe that's normal?
 > How hot is too hot?

As [EMAIL PROTECTED] pointed out, 100C is too hot.  I don't believe
those 110 to 190 numbers at all and suspect a drive would melt down at
anything near that.  Maybe these are Farenheit temperatures?

While perryh's advice about airflow and enclosures etc was spot on, I
suspect you need to check whether your particular drives may need some
corrective parameters if not fully covered by the smartctl database, as
some tend to do.  There are hints about this in smartctl(8) -v option.

 > #2. Sequences like this show up a fair amount:
 > Device: /dev/ad2, SMART Prefailure Attribute: 3 Spin_Up_Time changed
 > from 152 to 153
 > Device: /dev/ad2, SMART Prefailure Attribute: 3 Spin_Up_Time changed
 > from 153 to 152
 > Device: /dev/ad0, SMART Prefailure Attribute: 8 Seek_Time_Performance
 > changed from 251 to 250

It'd be more useful to see these within the context shown by smartctl -a

 > So is the real "problem" just that the drives are spun down and can't
 > spin up fast enough? I can probably live with the consequences of
 > that, and just go on with life -- The occasional HTTP request for an
 > audio file will fail the first time, and they have to hit reload.
 > 
 > This box is the fail-safe roll-over server for audio files that are
 > all up online somewhere else managed by a professional (not me), so
 > it's no surprise that the rare time-out on the real server also ends
 > up with a drive spin up and failed request on the "backup".  Kind of
 > annoying, I guess, to an end user, but forcing the drives to always be
 > spinning is probably not a Good Idea.

I don't know about that; while I wouldn't worry too much about spin-up
times unless it's a major annoyance to clients, I've always subscribed
to drives lasting much longer if left spinning.  The server delivering
this mail has spun its old IBM DTLA-something drive 24h/365d for nearly
9 years now, despite no aircon in a hot climate (up to ~45C in summer).

 > Oh, here's a rather long excerpt of the log in case there's minutae
 > within it that I've failed to include:
 > http://l-i-e.com/smartd.log

The output of smartctl -a for one or two of your drives would likely be
much more indicative.  I don't claim to be an expert in this at all, but
some of us might spot any obvious anomalies.

Cheers, Ian

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


Re: Determining daylight savings changes on BSD

2007-02-03 Thread Ian Smith
On Fri, 2 Feb 2007 22:06:42 -0500, John Nielsen <[EMAIL PROTECTED]> wrote:
 > On Friday 02 February 2007 17:35, Dan Nelson wrote:
 > > In the last episode (Feb 02), Robert Fitzpatrick said:
 > > > On Fri, 2007-02-02 at 10:36 -0600, Dan Nelson wrote:
 > > > > In the last episode (Feb 02), Robert Fitzpatrick said:
[..]
 > > > > That means you need to update your zoneinfo tables.  You can also use
 > > > > the date command to see if you need updating:
 > > > >
 > > > > date -r 1173679260
 > > >
 > > > Yes, thanks, looks like I need to do that, how do I update my zoneinfo
 > > > tables?
 > >
 > > Upgrading to 5.5 or 6.2 will get you the new tables as a side-effect of
 > > the upgrade :)  If you don't want to upgrade, just install the
 > > misc/zoneinfo port and rerun tzsetup.
 > 
 > The last bit (rerunning tzsetup(8)) is good advice for anyone who hasn't run 
 > it in a while. Upgrading from earlier versions of FreeBSD will install the 
 > new tzdata files but it will not touch /etc/localtime.

I think that was likely why I followed someone(?)'s advice to link

lrwxr-xr-x 1 root wheel 36 Apr 12 2006 /etc/localtime -> 
/usr/share/zoneinfo/Australia/Sydney

which continues to work despite several world upgrades, and despite
living over 500 miles from Sydney :) 

Cheers, Ian

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


Re: FreeBSD 6.1 & 6.2 hanging and/or spontaneous rebooting

2007-01-26 Thread Ian Smith
On Sat, 27 Jan 2007, Ian Smith wrote:

 > Sounds like an issue, but I don't think you need to recompile a kernel
 > to get APM, if you add 'hint.apm.0.disabled=0' to /boot/loader.conf it
 > should load with GENERIC.  It does on 5.x anyway, though I did compile
 > an APM kernel later, after getting things going that way.

Oops; just noticed that before compiling my kernel with APM, as well as
hint.apm.0.disabled=0 I'd also had apm_load="YES" in /boot/loader.conf

While trying it, also add hint.ata.1.disabled=1 to quell your IRQ 3 msg.

Cheers, Ian

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


Re: FreeBSD 6.1 & 6.2 hanging and/or spontaneous rebooting

2007-01-26 Thread Ian Smith
In freebsd-questions Digest, Vol 162, Issue 18
As Message: 6
On Fri, 26 Jan 2007 18:36:14 -0600 Joe Vender <[EMAIL PROTECTED]> wrote:

Argh, digests .. sorry, this came in just after my previous post:

 > On Friday 26 January 2007 18:18, Chuck Swiger wrote:
 > 
 > > The GUI commands within KDE are going to invoke the command-line
 > > shutdown command with the appropriate arguments.  What may be going
 > > on is that your old hardware only supports the older form of power
 > > management/shutdown mechanism, called APM, rather than the newer
 > > APCI.  You might find that reading "man 4 apm" and "man acpi" will
 > > give you some hints on debugging the issue.  It might help to try
 > > updating your machines BIOS, or to recompile a kernel with ACPI
 > > disabled but the older APM enabled, and see whether that gets you
 > > somewhere.

Sounds like an issue, but I don't think you need to recompile a kernel
to get APM, if you add 'hint.apm.0.disabled=0' to /boot/loader.conf it
should load with GENERIC.  It does on 5.x anyway, though I did compile
an APM kernel later, after getting things going that way.

 > There is no update to my machine BIOS as far as I know. What I have now is 
 > the 
 > last software that was released for it, and that was years ago. I have 
 > actually wondered if I should disable ACPI and enable APM in a new kernel 
 > build. I'll give it a try if I can get the real issue, which is the 
 > spontaneous reboots freezes, solved.

I still think that may be a KPPP issue, but we need to see your dmesg as
to whether ACPI is being used/detected (which likely won't work well if
at all with a machine that old, whereas APM is much more likely to).

Check that APM, rather than ACPI, is enabled in your BIOS.

 > > The fact that you can shutdown within Linux suggests that your
 > > hardware does have the capability, so it's just a matter of figuring
 > > out what's different.  Note that you might find that trying to run
 > > FreeBSD 4.11 to be informative, as the defaults for that older
 > > version might correspond with your hardware better, although, 4.11 is
 > > at the end of it's supported lifespan...

Sad but true.  4.x GENERIC had APM in kernel iirc, 5.x and 6.x don't.

 > I've been seriously thinking about getting a copy of the legacy FBSD 5.5 
 > that's on the website. Maybe there isn't a difference between it and the 6.2 
 > as far as this powerdown issue is concerned.

I'm running 5.5-STABLE here on a Compaq Armada 1500c, using APM.  I
could be wrong, but I don't think the APM code has changed noticeably
between 5.5 and 6.x, so I really wouldn't recommend going back to 5.5
until you've tried resolving this on 6.2 first, using the hints in
/boot/loader.conf first, and if necessary compiling APM into kernel.

Your /var/run/dmesg.boot, please, both re this and the sio issue.

Cheers, Ian

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


Re: FreeBSD 6.1 & 6.2 hanging and/or spontaneous rebooting

2007-01-26 Thread Ian Smith
In freebsd-questions Digest, Vol 162, Issue 17
As Message: 14
On Fri, 26 Jan 2007 14:15:10 -0600 Joe Vender <[EMAIL PROTECTED]> wrote:

Joe, I'm going to hack your message pretty mercilessly ..

 > I need Help with a FBSD spontaneous rebooting and freezing issue.

 > Here's a quick description of my computer system:
 > 
 > I have a Compaq Presario 5184 desktop about 7 or 8 years old
 > AMD K6-2 processor @ 380MHz
 > 320Mb RAM, 8Mb dedicated to video via BIOS
 > Quantum Bigfoot TS-6.4A Hard Drive (~6Gb capacity)
 > SiS 530 integrated graphics
 > Zoom 56k DUALMODE external modem connected to the serial port
 > CTX VL700 monitor (30-70/50-120 refresh rates)

[..]

 > worked fine under FBSD until I dial up the internet and start browsing, 
 > emailing or whatever. Then, when the computer is busy transferring packets, 
 > it suddenly reboots without warning. Sometimes, Konqueror will freeze, the 
 > mouse pointer will freeze for a few seconds before the reboot. It doesn't 
 > take very long on the internet before the lockup/reboot happens, only 
 > minutes. It happens over and over and over. I can't stay on the internet 
 > long 
 > enough to even use it.

Nothing at all reported in /var/log/messages? 

 > Remember, the spontaneous reboots and hangs only happen when I dial up the 
 > internet and start browsing or sending email or such, basically start 
 > sending/receiving packets. It doesn't happen when no packets are moving over 
 > the modem, only when its busy. It isn't the modem failing either, obviously, 
 > since the modem works flawlessly under Linux and windows.

Ok.  You mean it sometimes 'hangs' and sometimes just reboots?

 > One more thing that may or may not be important. I remember seeing a message 
 > at boot up about "IRQ 3 not in the list of probed ports" or something to 
 > that 
 > effect. But, KPPP recognized my external modem without a problem. Its 
 > on /dev/ttyS0 in KPPP. My computer came with an internal "winmodem" piece of 
 > @#!$, but I removed that when I plugged in the Zoom external. The internal 
 > modem is no longer present. The external is plugged in to the serial port. 
 > Could this be an IRQ conflict or something like that? I'm assuming that the 
 > message was about the absent internal modem. "Interrupts" in KInfoCenter 
 > reports that "serial" is using interrupt 4. Please help. I don't mind going 
 > through the reinstall if I can get FreeBSD working.

Ah, so you're using KPPP rather than FreeBSD's user PPP?  Have you tried
using 'regular' user PPP?  I don't know anything about KPPP, but would
expect with KDE's linux leanings that it would be using pppd instead. 
Where and how have you configured ppp?

In ancient PC tradition, IRQ 4 is used for the first serial port, IRQ 3
for the second.  Eg from /var/run/dmesg.boot here (also an older box): 

 sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
 sio0: type 16550A

I have sio1 disabled in /boot/loader.conf, just to quell such messages,
but it seems yours is using the correct IRQ (4) for your ext. modem. 

 > One last question. How do I get FBSD to completely power off my computer 
 > when 
 > I shut down, both from KDE and from console? When I shutdown, it just gets 
 > to 
 > the "system halted, press any key to reboot" prompt and doesn't completely 
 > power off. In slackware, all I have to do is uncomment the "modprobe apm" 
 > line in rc.modules.

Well that begs more questions.  Are you using APM? or ACPI?  What exact
command are you using to shutdown?  What does running just 'apm' say?

 > Sorry for such a long email, but I wanted to be as thourough as possible 
 > with 
 > the little I have to go on.

Posting latest /var/run/dmesg.boot would tell us more about what FreeBSD
thinks it's detecting, and I suspect that setting up user PPP by the
handbook would determine whether this is a FreeBSD or KPPP problem.

Cheers, Ian

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


Re: Problem with "ipfw flush"

2007-01-25 Thread Ian Smith
On Thu, 25 Jan 2007, Dan Mahoney, System Admin wrote:

 > On Fri, 26 Jan 2007, Ian Smith wrote:
 > 
 > Excellent.  I'll read up on this for a bit.

I've been reading man ipfw for years, but every time find something new :)

 > I suppose my biggest confusion was as to why I could do:
 > 
 > kldload ipfw && ipfw add 65000 allow ip from any to any
 > 
 > but not
 > 
 > ipfw flush && ipfw add 65000 allow ip from any to any
 > 
 > Clearly, the devil is in the output being sent.
 > 
 > Also, the manpage had -q and -f as mutually exclusive, and I missed the 
 > part about -q implying -f.

I guess the syntax 'ipfw [-f | -q] flush' does imply exclusivity, though
'ipfw -q -f flush' must work fine, when $fwcmd can be 'ipfw -q' ..

 > There IS one other issue that I encountered.  I have tables and pipes in 
 > play, and I believe a regular ipfw flush doesn't clear them.  Is there a 
 > universal "reset EVERYTHING" command?

I'm yet to use tables or pipes so can't say, except to see ipfw(8) has:

  ipfw table number flush
and
  ipfw [-s [field]] {pipe | queue} {delete | list | show} [number ...]

Cheers, Ian

[..]

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


Re: Problem with "ipfw flush"

2007-01-25 Thread Ian Smith
 Re: freebsd-questions Digest, Vol 162, Issue 11
 > Message: 31

On Wed, 24 Jan 2007 19:20:47 -0500 (EST), Dan Mahoney wrote:

 > On Wed, 24 Jan 2007, Kevin Kinsey wrote:
 > 
 > > Dan Mahoney, System Admin wrote:
 > >> Hey all.
 > >> 
 > >> In trying to tweak my firewall setup I'm using a file called 
 > >> /etc/ipfw.rules
 > >> 
 > >> However, it seems even though I copy my rules perfectly to that file, the 
 > >> system freezes up and locks me out when I do:
 > >
 > > /usr/share/examples/ipfw/change_rules.sh?
 > 
 > That is a very cool script, however, it appears as though it calls 
 > firewall_script on line 131 with "sh", not with ipfw.
 > 
 > nohup sh ${firewall_script} ${firewall_type}.new
 > 
 > Whereas, etc/rc.firewall calls ipfw on line 299 via the "ipfw" command:
 > 
 > ${fwcmd} ${firewall_flags} ${firewall_type}
 > 
 > The difference is that the resulting rules file would not be parseable by 
 > "sh" since the lines in the file would not contain the "ipfw" command but 
 > only the arguments.  As one's in "examples" and the other's in a live 
 > startup script, I'd assume the latter to be the correct method.

Either.  Check /etc/defaults/rc.conf and you'll notice that the default
for firewall_script="/etc/rc.firewall" so 'sh ${firewall_script}' runs
'sh /etc/rc.firewall' which runs ipfw -f flush, denying all connections,
then later, in your case with a given filename, ipfw $flags $pathname

Do you have firewall_quiet="YES" ?  This will help a lot, otherwise ipfw
writes to the terminal, which after the flush, it can't.  From ipfw(8):

 o   If you are logged in over a network, loading the kld(4) version of
 ipfw is probably not as straightforward as you would think.  I recom-
 mend the following command line:

   kldload ipfw && \
   ipfw add 32000 allow ip from any to any

 Along the same lines, doing an

   ipfw flush

 in similar surroundings is also a bad idea.

 > That said, this still does not tell me why a subsequent flush-and-rerun 
 > isn't working via ssh.  It works totally fine via the command line, but 
 > over ssh it gives:
 > 
 > Jan 24 19:10:55 ads-bsh-fwa4 sshd[845]: fatal: Write failed: Permission 
 > denied on the console (but by that point my connection's already dropped).

Exactly.

 > However, this shouldn't actually stop an already-typed command, should it?

Yes, if it's trying to write to the terminal.  The bottom line is that
if you want to run it from a command line over ssh, the command must say
nothing to the terminal until finished.  Even then, if your ssh session
was being permitted by a keep-state rule you'll still lose your session,
but as someone else (sorry) mentioned, you can log straight back in.

 > Additionally, it doesn't appear that /etc/rc.firewall has the smarts to do 

I think you mean /etc/rc.d/ipfw here?

 > this, as the "stop" command it lists only disables the kernel firewall 
 > structure via sysctl, but does NOT flush the rules, pipes, counts, or the 
 > like, so it's not a true "restart".  (the idea being that otherwise, every 
 > rule will be added twice -- the flush is a necessary step there).

It is necessary, and it's done on (re)start.  If you're using
rc.firewall, as it seems you are, then in /etc/rc.d/ipfw: 

  ipfw_start()
  {
# set the firewall rules script if none was specified
[ -z "${firewall_script}" ] && firewall_script=/etc/rc.firewall

Right?  Then:

if [ -r "${firewall_script}" ]; then
  # .. nat stuff ..

. "${firewall_script}"

which runs /etc/rc.firewall (in the current shell), starting with a) 
setting firewall_type - in your case, to your rules file, b) setting
fwcmd='ipfw -q' if firewall_quiet=yes (you do want this!) and then does
the '${fwcmd} -f flush' then (if not wedged) your rules.

 > Even if I add the "flush" command directly to /etc/ipfw.rules, and run 
 > ipfw -f /etc/ipfw.rules right from the command line, my connection gets 
 > dropped and the rest of the commands do not run.

Try with -q instead (this also implies -f)  RTFM on -q, until grokked.

 > In experimenting a bit more, I've found that I can do:
 > 
 > nohup ipfw -f /etc/ipfw.rules
 > 
 > This allows the rest of the ipfw command to run, but the HUP-on-disconnect 
 > still doesn't explain why the command doesn't even finish running.

I think it will IFF you use ipfw_quiet="yes" - and perhaps add a static
allow rule for your ssh access, before using any stateful rules, as any
existing dynamic connections will get clobbered on a flush, of course. 

Cheers, Ian

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


laptop screen always shutdown if no keyboard interaction for several minutes

2007-01-23 Thread Ian Smith
   Re: freebsd-questions Digest, Vol 162, Issue 5
 > Message: 3
 > Date: Tue, 23 Jan 2007 16:47:02 +0800
 > From: Zhang Weiwu <[EMAIL PROTECTED]>

 > Hello. I tried various ways to stop the laptop screen from being
 > shutting down, as I use this screen to watch debug message of an
 > application I am working on, I need monitor always on, no screensaver,
 > no blank, no dpms etc.

What make and model laptop?

 > I cannot do it. I have tried:
 >  1. set blanktime to "NO" in /etc/rc.conf
 >  2. set saver to "NO" in /etc/rc.conf

On my Compaq 1500c, saver only affects it while viewing a vty; I use
apm_saver which actually does power down my screen.  In X (KDE) saver
has no effect, and I usually have KDE's power management turned off. 

 >  3. start X server and run a terminal in it, run xset -dpms

What window manager?  KDE, for instance, can do its own screensaver
management, that could override or bypass your manual -dpms setting.

 >  4. check laptop BIOS setting (there is no setting for automatic
 > blank time

Your BIOS surely has settings for power management, both for battery and
mains power?  These might include screenblanking even if it's not called
that (eg maximum / minimum / no power savings or such)? 

Apart from manually invoked suspend/resume and battery state reporting,
apm relies on (and is oblivious to) the machine's BIOS APM settings for
blanking / disk off / suspend timers, or does on my 1500c at least.

 > I have not tried:
 >  I. remove 'apm' from kernel (I didn't compile ACPI into kernel
 > because this is an old notebook I am not sure if ACPI works, but
 > I have compiled apm in kernel, which is not shown in dmesg and
 > doesn't seem to work, e.g. 'shutdown -p' do not turn off the
 > power)

Usually - given we don't know what sort of old laptop - you can or must
specifically enable or disable APM and/or ACPI in BIOS.

If apm is not shown in /var/run/dmesg.boot then it isn't being used, or
perhaps not detected.  checking dmesg after booting verbosely might give
at least some clue about that, assuming that APM is enabled in BIOS. 

Boot to the loader prompt and check that hint.apm.0.disabled=0 and that
hint.apm.0.flags="0x20" (a safe default).  You could then 'boot -v' to
get your verbose dmesg.boot, which you may want to save for reference.

 > II. install Windows on the same computer to see if Windows can keep
 > the monitor on.

Hopefully it hasn't come to that, yet :)

 >III. boot the system to FreeDOS and see if monitor keep turned up (to
 > decide if LCD is turned off by hardware or software)

Sounds like an easy non-destructive test from a floppy or CD boot.

 > Any suggestions?

Provide some basic info.  Somebody else might know the same machine. 

Cheers, Ian

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


Re: /pub/FreeBSD/ports/i386/packages-5-stable/All

2007-01-11 Thread Ian Smith
On Thu, 11 Jan 2007, Kris Kennaway wrote:

 > OK, I've uploaded the packages now and they'll begin propagating out
 > to the mirrors.

Thanks again.  Now I'm right out of excuses, eh?

Cheers, Ian

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


Re: /pub/FreeBSD/ports/i386/packages-5-stable/All

2007-01-11 Thread Ian Smith
On Thu, 11 Jan 2007 at 04:17:21 -0600, Mark Linimon wrote:
 > On Thu, Jan 11, 2007 at 02:00:08AM -0500, Kris Kennaway wrote:
 > > On Thu, Jan 11, 2007 at 05:57:56PM +1100, Ian Smith wrote:
 > > > Hi Kris,
 > > > 
 > > > I know things must be pretty busy with 6.2, but is there any chance that
 > > > the 5.5-STABLE packages can be updated soon?  I just checked again, and
 > > > at least apache and phpyadmin are still stale, going on two months now.
 > > 
 > > Mark, what is the status of the upload of these packages?
 > 
 > The past 9 days I was sitting at various pay-fer internet cafes and thus
 > have not dealt with i386-5 (I had hoped it was going to be finished while
 > I was still in Munich and had the wireless).
 > 
 > I had thought of 'sending the reminder mails' and 'uploading the packages'
 > as one unit, but I suppose I should have split them up.  The former was
 > not feasible from the cafes.
 > 
 > I am now back but suffering from jet-lag so it will be another more 12
 > hours or so before I can look at the reminder-mails.  (I had a 25-hour
 > travel marathon between Koln and Houston.)

Hey, get some sleep, have a day off .. you're worth more to us alive :)

Thanks guys,

Ian

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


/pub/FreeBSD/ports/i386/packages-5-stable/All

2007-01-10 Thread Ian Smith
Hi Kris,

I know things must be pretty busy with 6.2, but is there any chance that
the 5.5-STABLE packages can be updated soon?  I just checked again, and
at least apache and phpyadmin are still stale, going on two months now.

Cheers, Ian

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


Re: UDP ok but TCP delayed

2007-01-10 Thread Ian Smith
Re: freebsd-questions Digest, Vol 160, Issue 13
 > Message: 29
 > Date: Thu, 11 Jan 2007 00:24:03 -0500
 > From: Bob McIsaac <[EMAIL PROTECTED]>

 > Got helpful replies before but still have a mystery 10 second delay
 > on a TCP connection. Slashdot takes with all it's links takes about
 > 30 seconds to load in any browser.  One tiny email displays a 10sec
 > progress bar.  Yet ping, FTP,  or pkg_add seems normal.  I get the
 > same result on 2 different computers. Both work fine with Linux.
 > 
 > My interest in FreeBSD is as an alternative for embedded projects
 > where Linux would typically be an automatic choice.
 > 
 > I confirmed with tcpdump that my ISP nameserver replies with
 > an IP address and nothing happens for 10 seconds until my
 > browser makes the connection.

I responded in some detail before re your tcpdump.  It clearly showed
that the nameserver you were using at 192.168.1.254 was *failing* to
respond to 1)  queries and 2) queries for its own reverse address.

 > tcp_keepalive="NO"

The default is YES .. any particular reason for using NO?

 > ifconfig_vr0="DHCP"
 > hostname="buffy.feline.cat"

 > # -- /etc/resolv.conf ---
 > nameserver 192.168.1.254
 > 
 > # --- /etc/hosts ---
 > ::1   localhost.home.com localhost
 > 127.0.0.1  localhost.home.com localhost
 > 127.0.0.1  buffy.feline.cat buffy

Hmm.  Maybe remove the IPv6 entry, you said you weren't using IPv6 but
the tcpdump did show your box amaking  queries.

I'm still curious as to where 192.168.1.254 lives?  In most cases this
would be your local ADSL router, say.  It doesn't *look* like it'd be
the address of your upstream provider's DNS, but then there are some
funny ISPs out there I guess.

Is 192.168.1.254 also your defaultrouter?  It's not in your rc.conf, but
perhaps that's being assigned by DHCP?  So should be, perhaps, upstream
DNS server address/es?  If 192.168.1.254 is local, it's misconfigured.

I *still* must suggest putting the address/es of known good upstream
nameservers in /etc/resolv.conf to see if that doesn't deal with your
delay, which seems almost certainly a DNS issue from everything you've
posted so far.

If that doesn't help, show us 'netstat -finet -ra' and 'ifconfig'?

Cheers, Ian

(please cc me; getting the next digest can take up to half a day)

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


Re: java plugin for firefox

2007-01-10 Thread Ian Smith
 > Re: freebsd-questions Digest, Vol 160, Issue 12
 > Message: 28
 > Date: Wed, 10 Jan 2007 23:10:00 +
 > From: eoghan <[EMAIL PROTECTED]>

 > On 10 Jan 2007, at 22:35, Garrett Cooper wrote:
 > > eoghan wrote:
 > >> Hi
 > >> Does anyone have a guide or advice for getting java plugin working  
 > >> for
 > >> firefox? Im running 6.1 on amd.
 > >> I have installed:
 > >> diablo-jdk-5.0
 > >> diablo-jre1.5.0
 > >> linux-blackdown-jre1.1.8
 > >> linux-sun-jdk1.4.2
 > >> when i try to access a java app from firefox im always presented with
 > >> the plugin missing page...
 > >> I had it working on i386 before with just the installation of  
 > >> java... Im
 > >> not sure what i have to do next...
 > >> Thanks
 > >> Eoghan
 > >
 > > Not sure why you're encountering the issue with Java and FF because it
 > > works perfectly fine for me. Do you have the linuxplugin-wrapper port
 > > installed by chance? Also, are the following files present in the
 > > following locations:
 > >
 > > [EMAIL PROTECTED] /usr/local]$ for i in `find . -name
 > > libjavaplugin_oji.so`; do ls -l $i; done
 > > lrwxr-xr-x  1 root  wheel  67 Dec 19 20:32
 > > ./lib/browser_plugins/libjavaplugin_oji.so ->
 > > /usr/local/diablo-jdk1.5.0/jre/plugin/i386/ns7/libjavaplugin_oji.so
 > > - -rwxr-xr-x  1 root  wheel  143280 Jun 13  2006
 > > ./diablo-jdk1.5.0/jre/plugin/i386/ns7/libjavaplugin_oji.so
 > >
 > > - -Garrett
 > 
 > Hi
 > Output is:
 > $ for i in `find . -name libjavaplugin_oji.so`;do ls -l $i;done
 > lrwxr-xr-x  1 root  wheel  67 Jan 10 22:41 ./libjavaplugin_oji.so -> / 
 > usr/local/diablo-jre1.5.0/jre/plugin/i386/ns7/libjavaplugin_oji.so
 > I dont have that plugin installed...
 > Thanks
 > Eoghan

It's not clear what directory '.' refers to there, but anyway ..

Having installed the jre the other day, running into the same problem,
perhaps the notes I made at the end of installing may be of some help.

First caveats: this on 5.5-STABLE and using Mozilla not Firefox, but I
doubt that either of those things matter.  Yes moz was installed first. 

===
[..]
Running post-install for diablo-jre-1.5.0.07.01..
Attempting to record package into /var/db/pkg/diablo-jre-1.5.0.07.01..
Trying to record dependency on package 'xorg-libraries-6.9.0' with
 'x11/xorg-libraries' origin.
Trying to record dependency on package 'javavmwrapper-2.0_6' with
 'java/javavmwrapper' origin.
pkg_add: warning: package 'diablo-jre-1.5.0.07.01' requires
 'javavmwrapper-2.0_6', but 'javavmwrapper-2.3' is installed
Package diablo-jre-1.5.0.07.01 registered in /var/db/pkg/diablo-jre-1.5.0.07.01


( to get the manuals, had to add to /etc/manpath.config:
OPTIONAL_MANPATH/usr/local/diablo-jre1.5.0/man
)

also see /var/db/pkg/diablo-jre-1.5.0.07.01/+INSTALL .. says it should
have installed the plugin in /usr/X11R6/lib/browser_plugins but this dir
doesn't exist .. so:

paqi$ mkdir /usr/X11R6/lib/browser_plugins
paqi# ln -sf
/usr/local/diablo-jre1.5.0/plugin/i386/ns7/libjavaplugin_oji.so 
 /usr/X11R6/lib/browser_plugins/libjavaplugin_oji.so

paqi# ll /usr/X11R6/lib/browser_plugins
total 0
lrwxr-xr-x  1 root  wheel  63 Dec 27 17:39 libjavaplugin_oji.so -> 
 /usr/local/diablo-jre1.5.0/plugin/i386/ns7/libjavaplugin_oji.so

But still the plugin doesn't turn up in mozilla about:plugins :(

Later .. worked it out from data on mozilla 'plugins for linux' page:

paqi# pwd
/usr/local/lib/mozilla/plugins
paqi# ll
total 20
-rwxr-xr-x  1 root  wheel  18768 Nov 16 04:14 libnullplugin.so

paqi# ln -s /usr/local/diablo-jre1.5.0/plugin/i386/ns7/libjavaplugin_oji.so 
libjavaplugin_oji.so

paqi# ll
total 20
-rwxr-xr-x  1 root  wheel  18768 Nov 16 04:14 libnullplugin.so
lrwxr-xr-x  1 root  wheel 63 Dec 27 17:51 libjavaplugin_oji.so ->
 /usr/local/diablo-jre1.5.0/plugin/i386/ns7/libjavaplugin_oji.so

.. and mozilla about:plugins happily sees it!
===

And modulo some funny font effects sometimes, its running fine.

So find your firefox plugin directory (wherever libnullplugin.so lives) 
and put the link to the jre library there.  Don't know about the jdk.

Cheers, Ian

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


Re: network tuning and performance troubleshooting

2007-01-05 Thread Ian Smith
 > Message: 18
 > Date: Thu, 04 Jan 2007 18:05:27 -0500
 > From: Bob McIsaac <[EMAIL PROTECTED]>

 > Doug Hardie wrote:
 > >
 > > On Jan 3, 2007, at 22:57, Bob McIsaac wrote:
 > >
 > >> Problem: Browser status 'looking up address' for 10 seconds for any
 > >> web page clicked. Slashdot takes almost a minute to load. But FTP
 > >> performance is good and running a shoutcast stream is no problem.
 > >> Sending mail via my ISP is slow.
 > >>
 > >> Investigation: -  "sysctl -a  | grep net | less" shows a ton of 
 > >> variables
 > >> with values assigned. Ping of nameserver assigned by dhcp takes 0.5ms.
 > >> Ping of freebsd.org = 90ms. Nothing obvious in loader.conf or
 > >> rc.conf  (defaults).  /var/log/messages has only startup info.
 > >>
 > >> Question: - How to solve this thorny performance problem?  -Bob-
 > >
 > > You might want to run tcpdump and monitor one of those slow loads.  
 > > Include the timestamp in the output and see what it is doing during 
 > > that time.  I would tend to suspect DNS timeouts.
 > >
 > >
 > tcpdump confirms there is a ten second delay as seen on the browser.
 > 1. there are some UDP packets to/from the nameserver.
 > 2. nothing happens for ten seconds
 > 3. now there is a TCP connection
 > 
 > tcpdump: listening on vr0, link-type EN10MB (Ethernet),
 > 
 > 17:34:07.537419 proto: UDP (17)
 >   192.168.1.102.53032 > 192.168.1.254.domain: 
 >   45959+ A? www.google.ca. (31)

You ask 192.168.1.254 - presumably your gateway, and/or internal DNS
server? - for www.google.ca's IPv4 address. 
 
 > 17:34:07.545218 IP proto: UDP (17)
 >   192.168.1.254.domain > 192.168.1.102.53032: 
 >   45959 6/7/4 www.google.ca. CNAME[|domain]

It's a CNAME.  Not sure if you got the right IP address there, though
from the later (after delay) connect to google.com, I suppose so ..

 > 17:34:07.545500 IP proto: UDP (17)
 >   192.168.1.102.64463 > 192.168.1.254.domain: 
 >   45960+ ? www.google.ca. (31)

Then you ask for www.google.ca's IPv6 address.  Do you really want that? 
You get no response on that, but maybe you're prepared to wait for it,
ie are you somehow relying on getting an IPv6 address, and if so, why? 

 > 17:34:07.868410 IP proto: UDP (17)
 >   192.168.1.102.61375 > 192.168.1.254.domain: 
 >   48085+ PTR? 254.1.168.192.in-addr.arpa. (44)

You then ask for your gateway's IP address, by name.  Hmm.  But you get
no response to that query.  Looks like you're about to wait for one ..
~4.6 seconds later you're still waiting, and you ask again .. 

 > 17:34:12.545947 IP proto: UDP (17)
 >   192.168.1.102.54649 > 192.168.1.254.domain: 
 >   45960+ ? www.google.ca. (31)

.. for that IPv6 address, and then you ask again ..

 > 17:34:12.868866 IP proto: UDP (17)
 >   192.168.1.102.55840 > 192.168.1.254.domain: 
 >   48085+ PTR? 254.1.168.192.in-addr.arpa. (44)

.. for your gateway's IP address from its name.  No answer.

 >  nothing happens for 10 seconds?? 

.. and then you appear to contact google.com successfully.

 > 17:34:22.546051
 >   (tos 0x0, ttl  64, id 226, offset 0, flags [DF],
 >   proto: TCP (6), length: 64)
 >   192.168.1.102.52363 > qb-in-f147.google.com.http: S,
 >   cksum 0x3aa5 (correct),
 >   1762925400:1762925400(0) win 65535nop,wscale 1,
 >   nop,nop,timestamp 1758025 0,sackOK,eol>

Are you obliged to use 192.168.1.254 for DNS?  The  queries aside
(which it should quickly NAK if it doesn't handle them), it seems broken
if it can't resolve it's own reverse DNS?  Can you use your upstream
provider's DNS server/s instead (ie in resolv.conf)?  Is your IP fixed
or DHCP-assigned?  If the latter, with or without auto DNS assignment? 

Cheers, Ian

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


Re: Batch file question - average size of file in directory

2007-01-03 Thread Ian Smith
On Wed, 3 Jan 2007, Kurt Buff wrote:

 > On 1/3/07, Ian Smith <[EMAIL PROTECTED]> wrote:
 > >  > From: James Long <[EMAIL PROTECTED]>
 > >  > > From: "Kurt Buff" <[EMAIL PROTECTED]>

[..]

 > >  > > I've got a directory with a large number of gzipped files in it (over
 > >  > > 110k) along with a few thousand uncompressed files.
 > >
 > > If it were me I'd mv those into a bunch of subdirectories; things get
 > > really slow with more than 500 or so files per directory .. anyway ..
 > 
 > I just store them for a while - delete them after two weeks if they're
 > not needed again. The overhead isn't enough to worry about at this
 > point.

Fair enough.  We once had a security webcam gadget ftp'ing images into a
directory every minute, 1440/day, but a php script listing the files for
display was timing out just on the 'ls' when over ~2000 files on a 2.4G
P4, prompting better (in that case, directory per day) organisation. 

[..]

 > >  > while read fname; do
 > > - >   if file $fname | grep -q "compressed"
 > > +if file $fname | grep -q "gzip compressed"
 > >  >   then
 > > - > echo -n "$(zcat $fname | wc -c)+"
 > > +  echo -n "$(gunzip -l $fname | grep -v comp | awk '{print $2}')+"

That was off the top of my (then tired) head, and will of course barf if
'comp' appears anywhere in a filename; it should be 'grep -v ^comp'.

 > Ah - yes, I think that's much better. I should have thought of awk.

That's the extent of my awk-foo, see Giorgos' post for fancier stuff :)

And thanks to James for the base script to bother playing with ..

Cheers, Ian

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


Re: Batch file question - average size of file in directory

2007-01-03 Thread Ian Smith
 > Message: 17
 > Date: Tue, 2 Jan 2007 19:50:01 -0800
 > From: James Long <[EMAIL PROTECTED]>

 > > Message: 28
 > > Date: Tue, 2 Jan 2007 10:20:08 -0800
 > > From: "Kurt Buff" <[EMAIL PROTECTED]>

 > > I don't even have a clue how to start this one, so am looking for a little 
 > > help.
 > > 
 > > I've got a directory with a large number of gzipped files in it (over
 > > 110k) along with a few thousand uncompressed files.

If it were me I'd mv those into a bunch of subdirectories; things get
really slow with more than 500 or so files per directory .. anyway .. 

 > > I'd like to find the average uncompressed size of the gzipped files,
 > > and ignore the uncompressed files.
 > > 
 > > How on earth would I go about doing that with the default shell (no
 > > bash or other shells installed), or in perl, or something like that.
 > > I'm no scripter of any great expertise, and am just stumbling over
 > > this trying to find an approach.
 > > 
 > > Many thanks for any help,
 > > 
 > > Kurt
 > 
 > Hi, Kurt.

And hi, James,

 > Can I make some assumptions that simplify things?  No kinky filenames, 
 > just [a-zA-Z0-9.].  My approach specifically doesn't like colons or 
 > spaces, I bet.  Also, you say gzipped, so I'm assuming it's ONLY gzip, 
 > no bzip2, etc.
 >
 > Here's a first draft that might give you some ideas.  It will output:
 > 
 > foo.gz : 3456
 > bar.gz : 1048576
 > (etc.)
 > 
 > find . -type f | while read fname; do
 >   file $fname | grep -q "compressed" && echo "$fname : $(zcat $fname | wc 
 > -c)"
 > done

 % file cat7/tuning.7.gz
 cat7/tuning.7.gz: gzip compressed data, from Unix

Good check, though grep "gzip compressed" excludes bzip2 etc.

But you REALLY don't want to zcat 110 thousand files just to wc 'em,
unless it's a benchmark :) .. may I suggest a slight speedup, template:

 % gunzip -l cat7/tuning.7.gz
 compressed  uncompr. ratio uncompressed_name
 13642 38421  64.5% cat7/tuning.7

 > If you really need a script that will do the math for you, then
 > pip the output of this into bc:
 > 
 > #!/bin/sh
 > 
 > find . -type f | {
 > 
 > n=0
 > echo scale=2
 > echo -n "("
 > while read fname; do
- >   if file $fname | grep -q "compressed"
+if file $fname | grep -q "gzip compressed"
 >   then
- > echo -n "$(zcat $fname | wc -c)+"
+  echo -n "$(gunzip -l $fname | grep -v comp | awk '{print $2}')+" 
 > n=$(($n+1))
 >   fi
 > done
 > echo "0) / $n"
 > 
 > }
 > 
 > That should give you the average decompressed size of the gzip'ped
 > files in the current directory.

HTH, Ian

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


Re: external touchpad for Thinkpad T23? (fwd)

2007-01-03 Thread Ian Smith
On Tue, 2 Jan 2007, Jurjen Middendorp wrote:

 > On Wed, Jan 03, 2007 at 02:49:48AM +1100, Ian Smith wrote:
[..]
 > >I've just bought a Thinkpad T23, and I'm loving it .. but I'm not sure
 > >I'll ever be able to love its TrackPoint, being spoilt by the touchpad
 > >on my old Compaq Armada 1500c, with which I can be quite productive ..
 > >
 > >The only one I've been able to google up that looks nearly small enough
 > >to work with below the keyboard is the Adesso/Cirque EasyCat PS/2 or USB
 > >pad .. any chance these will (some value of) work with FreeBSD 6? 
 > >
 > >moused(8) only mentions the older (serial, and way too chunky) ALPS
 > >Glidepoint, and the Interlink Versapad which looks more the right sort
 > >of size, but appears to be no longer available?
 > >
 > >I'd appreciate any clues.

 > Moused(8) doesn't mention the ALPS glidpoint nor the Interlink VersaPad. It 
 > mentions
 > the protocols those things use, so you could use all touchpad things that 
 > use that
 > protocol.

That's true.  I'm hoping someone has tried one or the other, or another. 

 > But i can't say that i have ever used one, so you might want to wait and see 
 > if
 > there is someone that has actually used them.  Maybe you can find a computer 
 > shop
 > where you can try it?

Not around here; it'll be an ebay job I guess, and I'd rather not blow
what may come to A$100 shipped unless it has a fair chance of working
passably well .. I googled myself goggled but only found ads and press
releases, no critical reviews or user experiences.

 > Anyway, if you buy the ps/2 touchpad specify the ps/2 proto... which is 
 > actually
 > described 15 lines below the ALPS gildepoint and 11 lines below versapad ;P 
 > And
 > the adesso usb touchpad is plug-and-play so i think that that one will work 
 > if you
 > set moused to 'auto' (don't forget usb-mice kernel options?).

Ta.  I'd usually prefer PS/2 but will need to hot-plug the pad, so USB.

 > You might also want to have a look at the ion window-manager. Especially on 
 > laptops
 > it's a real pleasure to work with because it decreases the need to use a 
 > mouse for
 > things, so you don't have to carry a lot of stuff - besides your laptop.  
 > And for
 > simple stuff like clicking links in a browser you can use the trackpoint! :)

Thankyou for the tips Jurjen,

Cheers, Ian

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


external touchpad for Thinkpad T23? (fwd)

2007-01-02 Thread Ian Smith
I originally posted this to -mobile three months ago, but got no
nibbles.  The T23 is is running 6.1-RELEASE presently.  Anyone?

-- Forwarded message --
Date: Mon, 2 Oct 2006 05:18:23 +1000 (EST)
From: Ian Smith <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: external touchpad for Thinkpad T23?

I've just bought a Thinkpad T23, and I'm loving it .. but I'm not sure
I'll ever be able to love its TrackPoint, being spoilt by the touchpad
on my old Compaq Armada 1500c, with which I can be quite productive ..

The only one I've been able to google up that looks nearly small enough
to work with below the keyboard is the Adesso/Cirque EasyCat PS/2 or USB
pad .. any chance these will (some value of) work with FreeBSD 6? 

moused(8) only mentions the older (serial, and way too chunky) ALPS
Glidepoint, and the Interlink Versapad which looks more the right sort
of size, but appears to be no longer available?

I'd appreciate any clues.

Cheers, Ian

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


PHP 5 with Apache 1.3 [reprise]

2006-12-20 Thread Ian Smith
Sorry to follow up on my own message, but it's all still true, and I
should report having found not a solution but at least a workaround ..

On Tue, 19 Dec 2006, Ian Smith wrote:
 > On Mon, 18 Dec 2006, Thomas Wahyudi wrote:
 > 
 >  > Ian Smith wrote:
 >  > > Hi all,
 >  > >
 >  > > bit of a long saga, and a (by now) humble question ..
[..]
 >  > > What do I need to do to get Apache to execute mod_php5 on .php files?
 >  > >
 >  > > Cheers, Ian
 >  > >   
 >  > have you check output from /var/log/httpd-error.log ? it should type 
 >  > some php version if the php is working correctly or
 >  > could you paste here the log from /var/log/httpd-error.log after you 
 >  > restart the apache ( assuming you install apache from port too )
 > 
 > Thanks Thomas,
 > 
 >  [Tue Dec 19 01:25:42 2006] [notice] Apache/1.3.37 (Unix) PHP/5.2.0 with
 >Suhosin-Patch configured -- resuming normal operations
 >  [Tue Dec 19 01:25:42 2006] [notice] Accept mutex: flock (Default: flock)
 > 
 > No, I'd installed apache-1.3.37_1 from the package, but that's not the
 > problem.  No errors at all appear in httpd-error.log since the build.
 > 
 > I've just now tried what should have been step #1, a /phpinfo.php page:
 >   
 > which works just fine, so now I can concentrate on finding out what's
 > wrong with my phpMyAdmin config .. maybe some cruft from earlier.

Further, .php scripts consisting only of the phpinfo() above, work fine
anywhere under docroot, and if called index.php, work for any directory
under docroot - but not in the phpmyadmin directory, unless referenced
directly eg http://localhost/mypmyadmin/index.php - which works fine.

Once so launched, phpmyadmin is working great, and I can get back to
work on several overdue tasks, which was the point of the exercise. 

However, I'm still bemused as to why this is happening:

 > The weird thing is that fetching /localhost/phpmyadmin/ Mozilla offers,
 > as mentioned, to save the file "" of type application/x-httpd-php, but
 > whether I cancel or go ahead and save the file under the chosen random
 > name - which works fine and is identical to /phpmyadmin/index.php -
 > absolutely NOTHING gets logged to httpd-access.log, either way .. ?

I turned logging on and up on php and apache.  Still the above fetches
deliver the raw index.php file to save, but still log NOTHING nowhere(?)

So here's what's in httpd.conf possibly (I think) related to this:

  #LoadModule php4_modulelibexec/apache/libphp4.so
  LoadModule php5_modulelibexec/apache/libphp5.so
  [..]
  #AddModule mod_php4.c
  AddModule mod_php5.c

  ServerName 127.0.0.1
  DocumentRoot "/usr/local/www/data"

  DirectoryIndex index.php index.html

  #% chasing php weirdness, normally LogLevel warn
  LogLevel info

  
[..]
Alias /phpmyadmin/ "/usr/local/www/phpMyAdmin/"


Options Indexes FollowSymlinks
AllowOverride None
Order allow,deny
Allow from all

  

  
[..]
#% 17/12/6 for php5 ..

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

[..]
  

Everthing else is pretty standard, and as it's been for ages, as was the
above, updated from php4 to php5 after building php5 for mod_php5.so. 

Permissions are standard: directories 755, files 644, owner root:wheel

Anyway, http://localhost/phpmyadmin/ always fails as above, while
http://localhost/phpmyadmin/index.php works fine, so I'll just have to
leave it at that for now .. it's still strange though .. 

Cheers, Ian

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


Re: undeliverable mail

2006-12-20 Thread Ian Smith
On Wed, 20 Dec 2006, Beastie MRA wrote:
 > On Dec 20, 2006 10:31 AM, Bill Vermillion <[EMAIL PROTECTED]> wrote:
 > 
 > >It's Wed, Dec 20, 2006 at 09:26 . I'm in a small dim room with
 > >doors labeled "Dungeon" and "Forbidden". There is noise, the door
 > >marked Dungeon flies open and Beastie MRA SHOUTS:
 > >
 > >>Dear All.
 > >>
 > >>For past few days, my MX receive thousand of undeliverable message
 > >>destinated for my non existent user at my domain.

This happens when you run a mailserver, however big or small, and will
keep on happening as long as email mark 1 keeps running; kids, crooks
and scammers learn how to assemble kit robots; and M$ rules the waves.

 > >>This message source come from valid and well configured (almost) smtp
 > >>server on internet.

If it's from a persistent single source, or a class of IPs on a single
network or ISP, a polite but well documented message to the responsible
contact address for the domain or IP address block often still works.

dig, and (e.g) dnsstuff.com or other whois frontends are handy friends.

 > >>I'ts waste my internet b/w, cause my MX will reject with non existent
 > >>user message.

Always to the same non-user, or a range of them?  You'll see both types.

 > >>I'll try spamd on my firewall and greylist on my MX (postfix), but
 > >>still
 > >>no effective, and i cannot block undeliverable
 > >>message as RFC rules

You can block anything you find a nuisance, and sometimes have to.  If
you can't do it with the mailserver and the RP for the domain won't or
can't help, use your firewall.  No RFC prohibits you from protecting
yourself or the network you're responsible for.

'ipfw add 1 deny tcp from $badmx to any 25 in recv $oif setup' is my
mantra for short term blocks .. if still happening after a few days,
they may get promoted to a higher rule number, else deleted.  Automatic
tools are great, but so are logs, tcpdump and your favourite firewall ..

But I doubt we get 260,000 messages a year here, so listen to Bill :)

 > >>Is there any way i can fix this ?
 > >>Please help
 > >
 > >I use the virtusertable in sendmail, and I have my valid addresses,
 > >such as [EMAIL PROTECTED] bv and then for after that is
 > >a line of @wjv.com nouser.
 > >
 > >And nouser is defined in aliases as nouser: /dev/null
 > >
 > >On one of the mail servers I maintain I just checked and I
 > >had 260,000+ messages routed to "*file*" in the maillog - which
 > >shows up as mailer=*file* in the logs. That maillog rotates
 > >every night at midnight.
 > >
 > >Is not really a freebsd-net problem so I removed that from the
 > >reply to line.

Me too. 

 > >Bill
 > >
 > >--
 > >Bill Vermillion - bv @ wjv . com
 > 
 > Thanks  for response...
 > 
 > but this virtusertable will not stop SMTP server in internet to keep
 > send you undeliverable message.

No, but delivery ends with the User Unknown response; you get no body. 

 > I assume someone doing nasty with forged and use my domain email to send
 > his spam message to non existing user.

You get that.  Lots.  But it's nearly all millions of rooted windows
boxes doing their [EMAIL PROTECTED] dance; don't take it too personally :)

 > and i got undeliverable message.

Sorry, do you mean a message in your maillog, or you're actually getting
phony bounce messages mailed to your address?  You get that too ..

Cheers, Ian

 > Is there any clue ??
 > Oh.. i forget to mention i use 4.11-STABLE for my MX
 > 
 > regards
 > Reza

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


Re: PHP 5 with Apache 1.3

2006-12-18 Thread Ian Smith
On Mon, 18 Dec 2006, Thomas Wahyudi wrote:

 > Ian Smith wrote:
 > > Hi all,
 > >
 > > bit of a long saga, and a (by now) humble question ..
 > >
 > > I reinstalled php5-5.2.0 from its package, after having to deinstall
 > > php 4 and reinstall 5 after the only major glitch on a portupgrade -aPP
 > > on a 5.5-STABLE system upgrading old ports, mostly from 5.4-R days.
 > >   
 > ... cut
 > 
 > > What do I need to do to get Apache to execute mod_php5 on .php files?
 > >
 > > Cheers, Ian
 > >   
 > have you check output from /var/log/httpd-error.log ? it should type 
 > some php version if the php is working correctly or
 > could you paste here the log from /var/log/httpd-error.log after you 
 > restart the apache ( assuming you install apache from port too )

Thanks Thomas,

 [Tue Dec 19 01:25:42 2006] [notice] Apache/1.3.37 (Unix) PHP/5.2.0 with
   Suhosin-Patch configured -- resuming normal operations
 [Tue Dec 19 01:25:42 2006] [notice] Accept mutex: flock (Default: flock)

No, I'd installed apache-1.3.37_1 from the package, but that's not the
problem.  No errors at all appear in httpd-error.log since the build.

I've just now tried what should have been step #1, a /phpinfo.php page:
  
which works just fine, so now I can concentrate on finding out what's
wrong with my phpMyAdmin config .. maybe some cruft from earlier.

The weird thing is that fetching /localhost/phpmyadmin/ Mozilla offers,
as mentioned, to save the file "" of type application/x-httpd-php, but
whether I cancel or go ahead and save the file under the chosen random
name - which works fine and is identical to /phpmyadmin/index.php -
absolutely NOTHING gets logged to httpd-access.log, either way .. ?

Anyway, more news (or questions) when I do (or don't) figure it out.

Cheers, Ian

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


PHP 5 with Apache 1.3

2006-12-17 Thread Ian Smith
Hi all,

bit of a long saga, and a (by now) humble question ..

I reinstalled php5-5.2.0 from its package, after having to deinstall
php 4 and reinstall 5 after the only major glitch on a portupgrade -aPP
on a 5.5-STABLE system upgrading old ports, mostly from 5.4-R days.

[FWIW, portupgrading phpMyAdmin from packages forces php5, as does its
dependency pecl-pdflib-2.1.2, neither of which require later than php
4.1 according to their docs.  Anyway, having decided to go with php5 ..]

Despite being listed as "PHP Scripting Language (Apache Module and CLI)" 
the php5-5.2.0 package is not built with mod_php5, which seems kinda odd
as that's what most folks want to install php for, I'd have thought? 

So I've made php5 from ports (make config; #add 'build Apache module';
make deinstall; make reinstall) and now have a shiny new mod_php5.so and
the install added that to httpd.conf, looking good: 

LoadModule php5_module libexec/apache/libphp5.so
..
AddModule mod_php5.c

However despite also adding to httpd.conf, hopefully in the right place,

DirectoryIndex index.php index.html
..
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

and after an apachectl restart (even apachectl stop; apachectl start),
with things looking ok according to /localhost/server-info and -status,

apache still wants to send raw .php pages to Mozilla, which whinges 'the
file ""  is of type application/x-httpd-php ..', offering to save it.

I'm trying this with phpmyadmin, all this was working before on php4,
and I've tried both -dist and -recommended as php.ini

What do I need to do to get Apache to execute mod_php5 on .php files?

Cheers, Ian

(Please cc me, I'm subscribed to the -digest which can take a while)

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


Re: /pub/FreeBSD/ports/i386/packages-5-stable/All/

2006-12-13 Thread Ian Smith
On Wed, 13 Dec 2006, Kris Kennaway wrote:
 > On Thu, Dec 14, 2006 at 03:44:13AM +1100, Ian Smith wrote:
[..]
 > > I was glad I'd specified -PP .. every fetch from $subject directory
 > > failed.  Checking manually, then and again tonight, I see that indeed
 > > only the versions of files that were (correctly) current at 4th December
 > > are still there now.  The latest file date there says 17th November.
 > > 
 > > Is this likely a temporary glitch, or do -stable packages only get
 > > updated to match the current ports tree after some expectable delay?

 > There's always a lag, of course (computers aren't yet infinitely fast
 > ;-).  It's usually only a lag of a couple of days for 6.x, longer for
 > 5.x since it's a "legacy" branch and not our main focus of activity.

As we're often enough reminded :)  Thought I'd get it all up to date,
then cvsup to 6.2 once released.

 > However the main FTP distribution server has been offline with
 > hardware failure for the past week or two, so I can't push out any of
 > the subsequent updates.  Hopefully this will be resolved soon (it's
 > also holding up the 6.2 release cycle).

Thanks Kris, may it Get Well Soon.  

BTW, just to try, I'd installed 6.1-R on another box over the net from
the boot-only CD, and enjoyed being able to install heaps of packages
from sysinstall that way, but was a bit dismayed to find it hadn't kept
the fetched packages .. is there a way to ask sysinstall to do that? 

Cheers, Ian

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


/pub/FreeBSD/ports/i386/packages-5-stable/All/

2006-12-13 Thread Ian Smith
Hi all,

FreeBSD paqi.smithi.id.au 5.5-STABLE FreeBSD 5.5-STABLE #0:  Sun Nov 19
20:22:12 EST 2006 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/PAQI5S_2 i386

On 4th December, after a recent portsnap fetch/update, I ran portupgrade
-anPP to prefetch all available packages for a well overdue upgrade of
all ports on this box, most dating from 5.4-RELEASE CDs 

Apart from taking ~7 hours to fetch ~550MB for ~220 packages, and except
for a few non-packageable ports, that went fine.  Then on 10th December,
after much study of UPDATING and adopting the procedures there for KDE,
I ran portupgrade -aPP on those packages, which apart from updating PHP4
then installing PHP5 on top of it (which I'll take up later) went better
than I'd dared to dream, taking ~8 hours.  Awesome work guys!

However after then running portsnap fetch/update to pick up anything new
since the 4th, and after upgrading portupgrade, ran another portupgrade
-anPP to pick up available packages for the ~35 ports newly out of date,
intending to finish off by building any remaining ports from sources.

I was glad I'd specified -PP .. every fetch from $subject directory
failed.  Checking manually, then and again tonight, I see that indeed
only the versions of files that were (correctly) current at 4th December
are still there now.  The latest file date there says 17th November.

Is this likely a temporary glitch, or do -stable packages only get
updated to match the current ports tree after some expectable delay?

Cheers, Ian

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


Re: BSDStats Report for December 1st, 2006

2006-12-06 Thread Ian Smith
On Tue, 5 Dec 2006, 09:50:20 -0400 "Marc G. Fournier" <[EMAIL PROTECTED]> 
wrote: 

 > - --On Wednesday, December 06, 2006 00:31:49 +1100 Ian Smith 
 > <[EMAIL PROTECTED]> wrote:
 > 
 > > On Mon, 4 Dec 2006 "Marc G. Fournier" <[EMAIL PROTECTED]> wrote:
 > >
 > > [..]
 > >
 > >  > report_devices sends the output of pciconf -l | grep -v none (active
 > > devices)
 > >
 > > Marc, I've wondered for a while why you're excluding 'none' devices, eg
 > > on my Compaq Armada 1500c (recent 5.5-STABLE) 'pciconf -lv' includes
 > >
 > > [EMAIL PROTECTED]:8:0: class=0x03 card=0xb1010e11 chip=0x00c0102c 
 > > rev=0x64
 > > hdr=0x00 vendor   = 'Asiliant (Chips And Technologies)'
 > > device   = '69000 AGP/PCI Flat Panel/CRT VGA Accelerator'
 > > class= display
 > > subclass = VGA
 > >
 > > which is not exactly an inactive device here?
 > 
 > 'k, my question back at you is why is there no driver associated with it? 
 > Shouldn't there be ... ?

It's a very good question :) but not one to which I know the answer.
dmesg, since 5.4-RELEASE through 5.5-STABLE reports:

  pci0:  at device 8.0 (no driver attached)

I couldn't find a pciconf saved from those days, but on 4.5-RELEASE
dmesg always reported it as:

  pci0:  at 8.0

with no difference in functionality.  Xorg recognises it fine either
way, as does VESA (which now only reports itself on a verbose dmesg)

 > But, that said ... I've removed the none driver, since all it will do i make 
 > the list longer, but it doesn't hurt anything ...

I notice tonight that all of the 'none' devices reported there all seem
also to be display adapters.  On my Thinkpad T23 (not yet reporting) I
see the pciconf 'none' devices are an Intel 82801CA/CAM SMBus Controller
and a Lucent LT Winmodem (shrug?)

 > > Perhaps they'd be more useful summarised by OS, or at least prefaced
 > > with 'f' or 'o', 'n', 'd' or something else indicative?  Just an idea ..
 > 
 > Click on the FreeBSD icon, and you'll get FreeBSD specific stats ... but, 
 > good 
 > point about the front page ones, will look at adding a label for there ...

Ah yes, and I see you're still working on things now.  Good stuff.

Ahem, could it be someone from (this time) Australia is gaming the
system?  We've gone up from 425 a little earlier to (just now) 555
FreeBSD systems, and while we're never sorry to be beating the Yanks,
especially at their own game, I doubt that it's fair dinkum, mate :) 

Cheers, Ian

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


Re: BSDStats Report for December 1st, 2006

2006-12-05 Thread Ian Smith
On Mon, 4 Dec 2006 "Marc G. Fournier" <[EMAIL PROTECTED]> wrote:

[..]

 > report_devices sends the output of pciconf -l | grep -v none (active devices)

Marc, I've wondered for a while why you're excluding 'none' devices, eg
on my Compaq Armada 1500c (recent 5.5-STABLE) 'pciconf -lv' includes

[EMAIL PROTECTED]:8:0: class=0x03 card=0xb1010e11 chip=0x00c0102c rev=0x64 
hdr=0x00
vendor   = 'Asiliant (Chips And Technologies)'
device   = '69000 AGP/PCI Flat Panel/CRT VGA Accelerator'
class= display
subclass = VGA

which is not exactly an inactive device here?

While at it, I'm finding the release stats rather confusing, mixing in
all of the various release versions of various *BSDs.  Having used
FreeBSD since 2.2, I have a fair idea which of those numbers are likely
not FreeBSD versions, and even an inkling of which OS some of the others
might be, but many mightn't know which were apples and which oranges. 

Perhaps they'd be more useful summarised by OS, or at least prefaced
with 'f' or 'o', 'n', 'd' or something else indicative?  Just an idea .. 

Cheers, Ian

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


IPFW: delete range of rules?

2006-12-01 Thread Ian Smith
Sorry folks, forgot to paste the subject for my preceding message.
Ah, the joys of replying to a -digest .. Ian

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


(no subject)

2006-12-01 Thread Ian Smith
Bit late, catching up on half a dozen questions-digests, but fwiw:

Re: freebsd-questions Digest, Vol 157, Issue 26
 > Message: 33
 > Date: Wed, 29 Nov 2006 14:55:52 -0500 (EST)
 > From: "Dan Mahoney, System Admin" <[EMAIL PROTECTED]>

 > Hey all, the ipfw man page says rules can be deleted individually or in 
 > groups, but I don't see (other than the sets) an easy way to craft 
 > deletion of rules in a range (for example, 500-550).
 > 
 > As the system I'm using crafts client rules by client numbers, this is a 
 > kinda useful feature, is it available somewhere?

Here's one of a number of scripts I wrote to manage client-group based
rules for ipfw1 (before sets), to do just that; 'scuse debugging noise.

#!/bin/sh
# ipfwdelrange.sh 28/1/4 smithi  optionally noisy for starters ..
version="1.0 28Jan04"
rulelist='/tmp/ipfwdelrange.rn'
set=''; q=''; v=''
[ "$1" = "-q" ] && q=y && shift # quiet
[ "$1" = "-v" ] && v=y && shift # verbose
[ ! "$q" ] && echo -n "ipfwdelrange.sh: "
[ $# -ne 2 ] && echo "usage: $0 [-q|-v] firstrule lastrule" && exit 1

/sbin/ipfw list | awk '{print $1}' >$rulelist   # existing rulenumbers
[ $? -ne 0 ] && echo "'ipfw list' failed!" && exit 1

while read rule; do # find any existing ipfw rules within range
[ $rule -lt $1 ] && continue
[ $rule -gt $2 -o $rule -eq 65535 ] && break
set="$set $rule"# includes duplicates; each must be deleted
done <$rulelist

if [ "$set" ]; then
[ ! "$q" ] && echo "deleting all rules in range ${1}-$2"
[ "$v" ] && echo "$set"
/sbin/ipfw -q delete $set # delete all existing in range
[ $? -ne 0 ] && echo "'ipfw delete' failed!" && exit 1
else
[ ! "$q" ] && echo "no ipfw rules to delete in range ${1}-$2"
fi

[ -f $rulelist ] && rm $rulelist
exit 0

I seem to recall ipfw2 deletes multiple rules with the same number with
one delete statement.  If that's the case, and you use any, make it: 
[ ! "`echo $set | grep $rule`" ] && set="$set $rule"
or you'll get error messages on repeated deletes of the same rule.

Cheers, Ian

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


Re: IPFW & NFS

2006-11-24 Thread Ian Smith
Re: freebsd-questions Digest, Vol 157, Issue 12
Message: 25

vittorio <[EMAIL PROTECTED]> wrote:

 > Well I tried something similar to your
 > ipfw add xxx allow udp from ${client} to ${server} ${nfsports} keep-state
 > ipfw add 300 allow udp from 10.0.0.2 to 10.0.0.1 2049,111,1022 setup 
 > keep-state
 > (it differs from your line for the setup option).
 > It ddidn't worked at all.

As mentioned earlier, 'setup' only applies to TCP.  And I'm not entirely
sure that covers all the UDP ports needed, but I can't check right now.

 > Afterwards, following Cuck's advise, I had a go at modifying the ipfw 
 > firewall 
 > in the nfs client 10.0.0.2 (no firewall for the time being on the nfs server 
 > 10.0.0.1) and added towards the end of the list, immediatedly before the 
 > very 
 > laste line denying everything else
 > 
 > 5 allow ip from 10.0.0.1 to 10.0.0.2
 > 51000 allow ip from 10.0.0.2 to 10.0.0.1
 > 65535 deny ip from any to any 

Well that would work, if there are no other blocking rules before those. 

 > It seemed to works partially! I mean that I could mount_nfs the share in 
 > the client, surfing the directories, reading and writing files in the share, 
 > BUT ... out of the blue, after some minutes the client freezed and I had to 
 > reboot :-( brutally turning off and on the box.

Even in (rare) cases where brutality is required, the reset button is a
lot easier on the box.  However I doubt your 'freeze' here has anything
to do with your firewall rules.  We haven't much info to go on so far: 

Are you using the standard NFS options on both server and client?
If not, what options?

Are you running rpc.statd and/or rpc.lockd on the server?  client?

Have you tried using TCP rather than UDP mode? (mount_nfs -T)
or interruptible mounts (-i)?  Maybe slower, but likely safer.

Have you tried running tcpdump on either box to watch the traffic?

If you show us what you _are_ trying, we won't have to guess ..

Cheers, Ian

[Please cc me also, digests often arrive after quite some delay]

 > Help please
 > Vittorio
 > 
 > Alle 05:25, giovedì 23 novembre 2006, Ian Smith ha scritto:
 > > vittorio <[EMAIL PROTECTED]> wrote:
 > >  > I have two FreeBSD 6.1 boxes one of which (IP 10.0.0.1) is an NFS server
 > >  > and the other one (IP 10.0.0.2) is, among other things, an NFS client
 > >  > sharing directories with the NFS server.
 > >  > It all works correctly and I can mount_nfs all the directories from the
 > >  > server.
 > >  > BUT, I'm now trying to use an IPFW firewall both on the server and on
 > >  > the client. My simple aim is to setup connections between the 10.0.0.1
 > >  > server and the 10.0.0.2 client ** only **; no connections should be
 > >  > possible with other clients!
 > >  > Now I've tried the poor documentation I could find googling with the
 > >  > keywords "freebsd ipfw nfs" to no avail, I cannot mount_nfs any share on
 > >  > te client because something goes wrong with RPC.
 > >  > Concentrating on the client side (no ipfw for the moment on teh server)
 > >  > I tried the following
 > >  >
 > >  > ipfw add 300 allow ip from 10.0.0.1 2049,111,1022 to 10.0.0.2 via fxp0
 > >  > setup keep-state
 > >  >
 > >  > OR
 > >  > ipfw add 300 allow ip from 10.0.0.1 to 10.0.0.2  2049,111,1022 via fxp0
 > >  > setup keep-state
 > >  >
 > >  > OR
 > >  > ipfw add 300 allow ip from 10.0.0.1 2049,111,1022 to me via fxp0 setup
 > >  > keep-state
 > >  >
 > >  > OR
 > >  > ipfw add 300 allow ip from 10.0.0.1 to me  2049,111,1022 via fxp0 setup
 > >  > keep-state
 > >  >
 > >  > If I disable the firewall it all goes smootly.
 > >
 > > Firstly, what Chuck and Bill said .. but some further points ..
 > >
 > > Secondly, you don't specify port numbers with 'allow ip', which covers
 > > tcp, udp and raw ip packets also; you want 'allow udp' here, unless of
 > > course you're using NFS over TCP as well, where you'd need 'allow tcp'.
 > > Note also that 'setup' only applies to TCP connections.
 > >
 > > Thirdly, if you do want to use stateful rules on the client, you'll do
 > > better doing them on your _outbound_ connections, something like:
 > >
 > >   ipfw add xxx allow udp from ${client} to ${server} ${nfsports} keep-state
 > >
 > > If it were me I'd concentrate on the server side firewall rules (and
 > > /etc/exports allowed hosts) both for allowing desired and disallowing
 > > undesired connections, so not having to worry much about what client/s
 > > may or may not be doing.
 > >
 > > 'man ipfw' is actually pretty good documentation, though there is a fair
 > > bit to absorb there.  I still read it before bedtime now and again :)
 > >
 > > Ciao, Ian

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


Re: IPFW & NFS

2006-11-22 Thread Ian Smith
vittorio <[EMAIL PROTECTED]> wrote:

 > I have two FreeBSD 6.1 boxes one of which (IP 10.0.0.1) is an NFS server and 
 > the other one (IP 10.0.0.2) is, among other things, an NFS client sharing 
 > directories with the NFS server.
 > It all works correctly and I can mount_nfs all the directories from the 
 > server.
 > BUT, I'm now trying to use an IPFW firewall both on the server and on the 
 > client. My simple aim is to setup connections between the 10.0.0.1 server 
 > and 
 > the 10.0.0.2 client ** only **; no connections should be possible with other 
 > clients!
 > Now I've tried the poor documentation I could find googling with the 
 > keywords "freebsd ipfw nfs" to no avail, I cannot mount_nfs any share on te 
 > client because something goes wrong with RPC.
 > Concentrating on the client side (no ipfw for the moment on teh server) I 
 > tried the following
 > 
 > ipfw add 300 allow ip from 10.0.0.1 2049,111,1022 to 10.0.0.2 via fxp0 setup 
 > keep-state
 > 
 > OR
 > ipfw add 300 allow ip from 10.0.0.1 to 10.0.0.2  2049,111,1022 via fxp0 
 > setup 
 > keep-state
 >   
 > OR
 > ipfw add 300 allow ip from 10.0.0.1 2049,111,1022 to me via fxp0 setup 
 > keep-state
 > 
 > OR
 > ipfw add 300 allow ip from 10.0.0.1 to me  2049,111,1022 via fxp0 setup 
 > keep-state
 > 
 > If I disable the firewall it all goes smootly.

Firstly, what Chuck and Bill said .. but some further points ..

Secondly, you don't specify port numbers with 'allow ip', which covers
tcp, udp and raw ip packets also; you want 'allow udp' here, unless of
course you're using NFS over TCP as well, where you'd need 'allow tcp'. 
Note also that 'setup' only applies to TCP connections.

Thirdly, if you do want to use stateful rules on the client, you'll do
better doing them on your _outbound_ connections, something like:

  ipfw add xxx allow udp from ${client} to ${server} ${nfsports} keep-state

If it were me I'd concentrate on the server side firewall rules (and
/etc/exports allowed hosts) both for allowing desired and disallowing
undesired connections, so not having to worry much about what client/s
may or may not be doing.

'man ipfw' is actually pretty good documentation, though there is a fair
bit to absorb there.  I still read it before bedtime now and again :)

Ciao, Ian

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


Re: Blank screen after using X

2006-11-16 Thread Ian Smith
On Wed, 15 Nov 2006, Christian Walther wrote:

 > I edited /etc/sysctl.conf and /boot/loader.conf, adding the
 > parameter/values you've given me, and rebooted the machine afterwards,
 > but it didn't change anything.

They might regarding suspend/resume video, but no, not for this one ..

 > As long as X is running, I can switch between the text consoles and X
 > without any problem. But as soon as I quit X the screen wents black
 > and is unusable until I do a cold boot.
 > I can switch to a console and start X again, thou, but the text
 > consoles remain unusable.

Sorry, I was mistaken .. I've still got this problem too.  Once I got
suspend/resume going I hadn't quit X in more than a month.  Tonight I
did, to check, and there was the blank screen again. 

So I resorted to my old workaround, which may also work for you; I just
type 'fixme' at the unseen vty prompt: 

t23# cat ~/bin/fixme
#!/bin/sh
# strangely enough, this invalid mode restores vttyX with the error message:
# vidcontrol: cannot activate raster display: Inappropriate ioctl for device
vidcontrol VESA_800x600

Bizarre, but the only way I found worked, by accident.  Valid vidcontrol
commands failed to achieve this for me, but I know very little magic ..

Earlier I'd found that setting one vty with 'vidcontrol VGA_80x30'
before starting X helped if I switched back to that, but only running
'fixme' saved me tonight.  It's evil, but sure beats rebooting ..

 > Sorry for repeating the issue, but maybe I mislead you, because this
 > is just one problem (at least as far as I can tell). Trying to update
 > to a new BIOS version might a solution, I should check if there is
 > anything newer available.

If you have access to a windows box to burn the floppies and a USB
floppy drive, or Windows on the T23, you're set.  I have neither yet.

 > I tried several configuration up to now, there are many location where
 > you can download them. All of them had the same problem, so I'm not
 > entirely convinced that this is an X configuration issue. But could
 > you sent me your configuration, so I can give this a try? If it
 > doesn't behave as my configuration does I might be able to locate the
 > problem.

Mailed separately.  At least X hasn't crashed on me yet with that conf. 

HTH, Ian

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


Re: Blank screen after using X

2006-11-14 Thread Ian Smith
On Mon, 13 Nov 2006 Christian Walther wrote:

 > I forgot to mention that the machine is an IBM Thinkpad T23 with S3
 > Savage chip, max. resolution is at 1024x768.

Ok, now your first problem becomes one that I've had :)

 > > I'm using FreeBSD 6.x for a couple of month now, and I'm quite happy with 
 > > it.
 > > Since the beginning I've a problem that I was unable to fix: When I
 > > quit X, or X dies for some reason, the screen remains black. I can
 > > type blindly, starting X again, or doing a shutdown.

I tried quite a few things to fix this on my T23, and wound up having in
/etc/sysctl.conf: 
 hw.acpi.reset_video=0
 hw.syscons.sc_no_suspend_vtswitch=1

and in /boot/loader.conf:
 acpi_ibm_load-"YES"
 hint.psm.0.flags="0x3000"
 vesa_load="YES"

VESA may or may not be relevant; it seemed to help here.  Getting screen
restoration through suspend/resume, from either X or vty, was my goal. 

 > > I searched the net a found an older thread from another FreeBSD-User,
 > > posted to this mailing list. Link to the initial message:
 > > http://docs.freebsd.org/cgi/getmsg.cgi?fetch=195067+0+archive/2006/freebsd-questions/20060723.freebsd-questions
 > >
 > > It was suggested that this would be a configuration problem, that
 > > something has to be changed in xorg.conf. But there isn't any solution
 > > provided, so I hope that someone here can help me.
 > >
 > > I'll attach Xorg.0.log with the latest crash information (it complains
 > > a segfault at the end), and my current xorg.conf.

Can't help with that.  I'll look through these later; if your conf was
autodetected it's a bit different to mine.  I just added stuff from a
config given on the FLCL, and may have some refresh rates and such non
optimal, but it's been working ok on 6.1-R here.

Hope the above helps with the blank screen problem.  Caveat: my T23's
still running an ancient BIOS and EC that can't be updated until I find
an external USB floppy drive - or go mad and install Windows or freedos?
to get that done - which might also be relevant.

Cheers, Ian

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


deleting automatically the oldest file from a harddisk

2006-11-14 Thread Ian Smith
On Mon, 13 Nov 2006 Koen de Wijs wrote:

 > I have a ftp -server. I use a harddisk of  9 Gb for the ftp-directory.
 > 
 > This isn't very big so I want to throw away the oldest file if the disc 
 > is full.

I'd tend to define 'full' as perhaps 8GB in that situation, and likely
protect at least some ftp directories from purely date-based purging.

 > I can write a cronjob that checks every minute. But isn't there another 
 > solution;

If you leave enough headroom then hourly might be often enough?

 > Can't I just write a C program that listens to some systemcalls and 
 > automatically deletes the oldest file if the harddisk is full???

Well you can do anything in C if you know how and have the time :) but a
small script using existing utilities would be a lot easier.

Sounds like a job for find(1) to me.  Search for the numerous primaries
matching 'time' or 'newer', also see -size and maybe others useful for
generating a list of pathnames of your candidate(s) to feed to rm(1)

Cheers, Ian

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


Re: lpt0 printer slows system response significantly

2006-11-02 Thread Ian Smith
On Wed, 1 Nov 2006 Anton Shterenlikht wrote:
 > On Wed, Nov 01, 2006 at 10:49:36AM -0500, Lowell Gilbert wrote:
 > >  * Change the printer port to polled mode.  ["lptcontrol -p"]
 > >With this kind of hardware, it may even speed up your printing as well.
 > 
 >  Thanks a lot, I think it does print a bit faster. But more
 > importantly I see virtually no performance degradation during
 > printing.
 > 
 >  Perhaps a sentence on this should be added in section
 > 9.3.1.3 (Setting the Communication Mode for the Parallel Port) of
 > the user manual somewhere in the end of this pararaph:
 > 
 >  The interrupt-driven method is usually somewhat
 >  faster but uses up a precious IRQ line. Some newer
 >  HP printers are claimed not to work correctly in
 >  interrupt mode, apparently due to some (not yet
 >  exactly understood) timing problem. These printers
 >  need polled mode. You should use whichever one works.
 >  Some printers will work in both modes, but are
 >  painfully slow in interrupt mode.
 > 
 > and then add something like:
 > 
 >  On slower machines using interrupt mode might cause
 >  significant degradation of the overall system perfor-
 >  mance due to the interrupt service using most of the
 >  CPU time. On such machines changing to polled mode
 >  will balance the CPU load as well as result in
 >  faster printing.
 > 
 >  Perhaps I should send a message to the documentation
 > list?
 > 
 > anton

I'm not sure if that's generally true for slower machines; you haven't
said (or I missed) what sort of printer you're using, what filters you
run via printcap, and such?  Not one covered by the existing para?

I have a 1500c, bit faster than your 1700 @300MHz, that has printed lots
of large files via gs without ever seeing any significant irq 7 load nor
any slowdown of the machine at all - albeit using a slow old printer. 

Not that I see any problem with your proposed addition.  Perhaps 'On
some slower machines running fast printers using interrupt mode ..' ? 

Cheers, Ian

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


systat -vm not seeing /dev/acd0

2006-10-31 Thread Ian Smith
Hardly a showstopper, but ..

Burned a backup CD on a 4.10-RELEASE system downtown; no problem.

Being important, I checked by mounting it (/dev/acd0) and running 'cat
/cdrom/* >/dev/null' which was useful verification given all were big
compressed files in the CD's root directory.

That was taking a while so I ran systat -vm in another vty, watched it
reading away at about 2MB/s, more or less as expected from that drive.

Got home and (being important) checked it by the same method on a 6.1-R
GENERIC system (no /dev/cd0, only acd0 in dmesg).  systat -vm showed no
acd0 device, just ad0.  man systat, tried the :drives command; just ad0

Tried again on a 5.5-S @1stAug system.  systat -vm also didn't see acd0,
though due to atapicam, scbus & pass in kernel, showed it once remounted
on /dev/cd0 - 'Disks ad0 da0 cd0 pass0 pass1'.  Same issue with iostat.

Copying the CD to ad0 implied the reading rate of course (~3.5MB/s) so
that's a workaround for the 6.1-R system, but should I be surprised that
{sys,io}stat can't see acd0 as it used to on 4.X?  Anything that would?

Cheers, Ian

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


Re: Non English Spam

2006-10-15 Thread Ian Smith
On Sun, 15 Oct 2006 [EMAIL PROTECTED] wrote:
 > Message: 2
 > Date: Sun, 15 Oct 2006 12:47:37 +0200
 > From: Erik Norgaard <[EMAIL PROTECTED]>

 > Ted Mittelstaedt wrote:
 > 
 > >> I have noted however, that some subscribers to this list write english
 > >> encoded in one of the above character sets, I don't know enough about
 > >> the character set definition, but it seems that English characters are a
 > >> subset of any character set?
 > >>
 > >> What is the recommended policy here? Should subscribers be advised to
 > >> change character set when posting to the list?
 > > 
 > > No.  It's the responsibility of the person doing the filtering - in this
 > > case you -
 > > to exempt any known good e-mail sender from your filters.
 > 
 > > You know damn well that legitimate mailing list mail comes from
 > > 
 > > mx2.freebsd.org (mx2.freebsd.org [216.136.204.119])
 > > 
 > > it's right in the headers of the messages on the list.
 > 
 > First: You know all too well that filtering based on "Received" header 
 > fields is not reliable - any decent spammer know how to forge that. 
 > Accepting mail from a particular host should be done even before the 
 > mail delivery starts.

Ted's talking about the _first_ Received header, see mine below.  It's
the only one you _can_ rely on, assuming your mailserver isn't lying to
you.  Subsequent headers, sure, all can be faked, trust noone .. :)

 > Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119])
 >  by gaia.nimnet.asn.au (8.8.8/8.8.8R1.4) with ESMTP id WAA18000
 >  for <[EMAIL PROTECTED]>; Sun, 15 Oct 2006 22:02:19 +1000 (EST)
 >  (envelope-from [EMAIL PROTECTED])

There's the verified IP address of the connecting peer mailserver, that
IP's reverse resolution from DNS, and the HELO presented.  Any and all
of which can be analysed, looked up in maps, blacklisted, whitelisted,
or filtered any way you want, no? 

 > Second: If you know postfix, you also know that header filtering is 
 > independent of other checks, even the result of filtering on individual 
 > header lines are independent.

Does that mean you can't black/grey/whitelist by connecting mailserver?

 > So the ideal you mention is not an option until a complete public list 
 > of authorized mail servers is available and all mail relayed through 
 > these requires authentication.

That's the 'solution' the mega players appear to be proposing.  And who
then authorises whom to run mailservers?  What about, er, us?  Shudder. 

 > Or do you have the solution that does not imply accepting any of a 
 > myriad of character sets?
 > 
 > I'd be happy to implement that, but I don't want to open my mail server 
 > to receive mail I have no means of reading and understanding just 
 > because it is RFC compliant.

Like any one, you can reject any mail you don't fancy, for whatever
reason you don't want it.  That doesn't require proposing that others
should do likewise, as in wanting to specify 'standards' for lists.

As Ted pointed out, various people often post perfectly intelligible
messages in English in the various FreeBSD lists, reporting non-Roman
charsets.  I could mention one regular poster (and committer) whose
messages provide no charset information at all :)

 > > You have no right to
 > > force other people to conform to what you feel is acceptable formatting
 > > of their message as long as they meet the SMTP rfc standards.  That's
 > > why we have RFC's.
 > 
 > You you know perfectly well that content filtering is not based on the 
 > RFC's on SMTP but rather on the Internet Message Format and various 
 > RFC's on MIME - but I assume that you meant to refer to these.
 > 
 > Basically what you say here is that spammers have every right to flood 
 > mail servers as long as they do so compliant with the RFC's?

Have you noticed a lot of non-Roman charset spam on the FreeBSD lists?

 > I don't force anyone to conform to any arbitrary standards that I decide 
 > upon, but I have every legitimate right to reject anything that doesn't 
 > conform to my arbitrary standards.

Of course.

 > Yet, it is somewhat implicit that this is an English language list, any 
 > one writing in a different language may be lucky to find someone who can 
 > respond in their language, but are just as often referred to one of the 
 > language specific lists - if their message is not simply ignored.

We're not - with respect to suggesting 'rules' for these lists - talking
about non English language messages.  As you say, they get dealt with,
often offlist, by someone helpful who knows that language.  So this is
about whether to 'enforce' particular charsets for messages in English.

 > So we do actually impose some arbitrary rule on subscribers, namely to 
 > write in English. Given that we find it reasonable to impose such a 
 > rule, then why is it unreasonable to impose that they should abstain 
 > from obscure non-English character sets?

Because it's unnecessary, as well as arbitary, to filter list messa

External touchpad?

2006-10-13 Thread Ian Smith
Hi,

running a Thinkpad T23 on 6.1-RELEASE.  Happy but for the 'stickmouse',
finding it tediously unproductive after using a nice touchpad for years. 

Does anyone know of a usable compact external touchpad?  The Cirque Easy
Cat (http://www.cirque.com/cpages/?page=24) looks about a useful size,
but Google has so far let me down regarding whether this might work with
FreeBSD, PS/2 or USB.  It seems to be a successor to the ALPS Glidepoint
(too chunky, serial only) which has long been listed as supported. 

Or are there any others?  Thanks in advance for any tips,

Cheers, Ian

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


Re: Strange X problem

2006-10-07 Thread Ian Smith
On Sat, 7 Oct 2006 [EMAIL PROTECTED] wrote:
 > Message: 26
 > Date: Fri, 06 Oct 2006 19:36:32 -0500
 > From: Paul Schmehl <[EMAIL PROTECTED]>

 > --On October 6, 2006 5:23:45 PM -0700 backyard 
 > <[EMAIL PROTECTED]> wrote:
 > >
 > > "For FreeBSD, edit /etc/ttys and find the line like
 > > this:
 > >
 > > ttyv8   "/usr/X11R6/bin/xdm -nodaemon"  xterm   off
 > > secure
 > >
 > >   and edit it to this:
 > >
 > > ttyv8   "/usr/local/bin/kdm"  xterm   on secure
 > >
 > Yeah, I got a chance to look at it this afternoon, and that's what the 
 > problem was.  I wasn't looking closely enough at that line.

Maybe you were looking _too_ closely at:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/x11-wm.html

which I was browsing just before seeing your thread, that indeed says:

  To enable kdm, the ttyv8 entry in /etc/ttys has to be adapted. The
  line should look as follows:

  ttyv8 "/usr/local/bin/kdm -nodaemon" xterm on secure

Cheers, Ian

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


Re: triouble with my Deskjet 500

2006-10-01 Thread Ian Smith
Re: freebsd-questions Digest, Vol 152, Issue 13
On Sun, 1 Oct 2006 [EMAIL PROTECTED] wrote:
 > Message: 30
 > Date: Sat, 30 Sep 2006 17:12:10 -0700
 > From: Gary Kline <[EMAIL PROTECTED]>
 > Subject: triouble with my Deskjet 500

Hi Gary,

 >  The trouble is that it only prints in ASCII Aand fails to fails
 >  to print xv images or anything else PostScript.  I'm playing
 >  around withthe following in /usr//local/libexec:
 > 
 > #!/bin/sh
 > #
 > # hpif - Simple text input filter for lpd for HP-PCL based printers
 > # Installed in /usr/local/libexec/hpif
[..]
 > #  Read first two characters of the file
 > #
 > IFS="" read -r first_line
 > first_two_chars=`expr "$first_line" : '\(..\)'`
 > 
 > if [ "$first_two_chars" = "%!" ]; then
 > #
 > #  It is PostScript; use Ghostscript to scan-convert and print it.
 > #
 > #  Note that PostScript files are actually interpreted programs,
 > #  and those programs are allowed to write to stdout, which will
 > #  mess up the printed output.  So, we redirect stdout to stderr
 > #  and then make descriptor 3 go to stdout, and have Ghostscript
 > #  write its output there.  Exercise for the clever reader:
 > #  capture the stderr output from Ghostscript and mail it back to
 > #  the user originating the print job.
 > #
 > exec 3>&1 1>&2
 > /usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=djet500 \
 > -sOutputFile=/dev/fd/3 - && exit 0
 > else
 > #
 > #  Plain text or HP/PCL, so just print it directly; print a form feed
 > #  at the end to eject the last page.
 > #
 > echo "$first_line" && cat && printf "\033&l0H" &&
 > exit 0
 > fi

 >  It's pretty obviouslythat I can toss the first several lines that
 >  came from the originl hpif file; this was before I cared about
 >  graphics.  I lost the ghostscript part when my system had its 
 >  fatal trap.   Anybody out there who has an ancient hp djet500?
 >  or can help otherwise.  I'm out of ideas.

I ran into exactly this after upgrading 4.5-R to 5.4-R (now 5.5-S); that
fancy stderr/stdout dance doesn't seem to work &/| be needed anymore.  I
got sick of Mozilla crashing trying to print and dug up this fix, forget
where/how.  Way over commented, but times like this it comes in handy :) 

#!/bin/sh
#% /usr/local/libexec/if-lq850 smithi 6/4/3
#% v2 29/6/6, maybe the 3>&1 stuff is what doesn't work in 5.4-R?
#% as advised by FreeBSD handbook, from:
#  ifhp - Print Ghostscript-simulated PostScript on a DeskJet 500
#  as installed in /usr/local/libexec/hpif
#% modified for printer canon bj10sx (configured as an epson lq850)

#  Treat LF as CR+LF:
#  (HP specific - and the bj10sx is switch-set for this)
# printf "\033&k2G" || exit 2

#  Read first two characters of the file
#% was 'read first_line' - presumably this ignores \ or spaces

IFS="" read -r first_line
first_two_chars=`expr "$first_line" : '\(..\)'`

if [ "$first_two_chars" = "%!" ]; then

  #% dunno where I found this?  Worked on 4.5, but not on 5.4?
  if 0; then
#  It is PostScript; use Ghostscript to scan-convert and print it.
#
#  Note that PostScript files are actually interpreted programs,
#  and those programs are allowed to write to stdout, which will
#  mess up the printed output.  So, we redirect stdout to stderr
#  and then make descriptor 3 go to stdout, and have Ghostscript
#  write its output there.  Exercise for the clever reader:
#  capture the stderr output from Ghostscript and mail it back to
#  the user originating the print job.
exec 3>&1 1>&2
/usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=lq850 \
-sOutputFile=/dev/fd/3 - && exit 0
  fi
  #% instead use the default as per current handbook

/usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=lq850 \
-sOutputFile=- - && exit 0

else
#  Plain text [or HP/PCL], so just print it directly; print a form feed
#  at the end to eject the last page.
#% use w/out closing ff, was:
#% echo $first_line && cat && printf "\033&l0H" && exit 0
#% looks HP-specific .. how about just (12d = $0c =) printf "\014" ?

echo $first_line && cat && exit 0
fi
exit 2

# Finally, you need to notify LPD of the filter via the if capability:
# :if=/usr/local/libexec/hpif: in /etc/printcap

#% :if=/usr/local/libexec/if-lq850

# That is it. You can type lpr plain.text and lpr whatever.ps
# and both should print successfully.

Cheers, Ian

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


Re: Top not showing cpu usage even remotely accurately

2006-09-15 Thread Ian Smith
On Thu, 14 Sep 2006, Dan Nelson wrote:

 > In the last episode (Sep 14), Ian Smith said:
 > [..]>
 > > However that doesn't explain this typical top view when the system is
 > > quiescent or nearly so, as it mostly is, with only 5-minutely crons and
 > > 11-minutely entropy runs and the odd sendmail to be seen in lastcomm: 
 > > 
 > > last pid: 18500;  load averages:  0.01,  0.08,  0.06up 5+08:40:33 
 > > 17:30:30
 > > 136 processes: 3 running, 110 sleeping, 23 waiting
 > > CPU states:  5.7% user,  0.0% nice,  6.3% system,  0.0% interrupt, 88.0% 
 > > idle
 > > Mem: 73M Active, 18M Inact, 46M Wired, 8108K Cache, 25M Buf, 2572K Free
 > > Swap: 384M Total, 106M Used, 278M Free, 27% Inuse
 > > 
 > >   PID USERNAME PRI NICE   SIZERES STATETIME   WCPUCPU COMMAND
 > >11 root 171   52 0K 8K RUN102.3H 86.82% 86.82% idle
 > >   743 smithi960 26616K  2908K select 156:40  1.03%  1.03% kdeinit
 > >   708 smithi960 34140K 15024K select 223:05  0.63%  0.63% Xorg
 > >   644 root  960  1244K   244K select  30:19  0.05%  0.05% moused
 > >   775 smithi200 11524K  1028K kserel 319:17  0.00%  0.00% xmms
 > 
 > > It never shows more than about 90% idle, whereas a 0.01 shorter term
 > > load average should indicate more like 99% idle, shouldn't it?  97-99%,
 > > sometimes 100% idle was what FreeBSD 4.5-R used to tell me with the same
 > > workload in around the same memory use, but maybe 4.5 was optimistic .. 
 > 
 > I would guess that maybe xmms (or some other threaded app) is your
 > hidden CPU consumer.  The kernel does not calculate %CPU correctly for
 > libkse-threaded programs, and they usually show up as 0% all the time. 
 > The TIME column does update correctly, though.  If you switch to libthr
 > with libmap.conf, you'll get accurate threaded %CPU reporting.

Ah, thanks for a solid boot up the learning curve, Dan.  Took me a while
to connect kse(2) as it's not referred to as such in ldd output, but I
kept digging. For sure xmms and moz are 2 that have gone mad 'quietly'.

I assume then that libkse is what the three multi-thread programs I'm
running (xmms, mozilla-bin and mysqld) are now using, where for each
of them `ldd $program | grep thr` shows
 libpthread.so.1 => /usr/lib/libpthread.so.1

So can/should I set in (a new) /etc/libmap.conf generally:
 libpthread.so.1 libthr.so.1
 libpthread.so   libthr.so

or would it be better to just target these specific programs, eg:

[/usr/X11R6/lib/mozilla/mozilla-bin/]  # assuming loaded with full path?
 libpthread.so.1 libthr.so.1
 libpthread.so   libthr.so

Are there any likely downsides to using libthr instead?  Esp. mysqld?

I've already found that stopping those three processes lifts shown idle
to ~95%, but then I also note that ldd other things - including kdeinit
ie all main KDE processes - refer to libpthread.so.1 too, but only the
above 3 ever seem to appear in state 'kserel' (This is all new to me :) 

Cheers, Ian

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


Re: Top not showing cpu usage even remotely accurately

2006-09-14 Thread Ian Smith
On Thu, 14 Sep 2006, Giorgos Keramidas wrote:

 > On 2006-09-14 00:48, "Tamouh H." <[EMAIL PROTECTED]> wrote:
 > > I think TOP and load averages are no longer accurate on FBSD 5.x and
 > > 6.x with SMP kernel. As far as I've seen. Load averages hit sometimes
 > > 8.0 without a noticable degradation in performance.

I still can't fathom what top tells me on a UP 5.5-STABLE system (300MHz
Celeron if speed's relevant).  I initiated this thread (weeks ago :) re
seeing 0.0% idle (as expected) during buildworld but not seeing anything
add up to anything like 100%, including S)ystem processes, in top. 

Chuck Swiger pointed out that a buildworld runs lots of processes for
far shorter times than top's sampling interval, which was true, as a
browse with 'lastcomm -eE | less' through the buildworld time showed.

However that doesn't explain this typical top view when the system is
quiescent or nearly so, as it mostly is, with only 5-minutely crons and
11-minutely entropy runs and the odd sendmail to be seen in lastcomm: 

last pid: 18500;  load averages:  0.01,  0.08,  0.06up 5+08:40:33 17:30:30
136 processes: 3 running, 110 sleeping, 23 waiting
CPU states:  5.7% user,  0.0% nice,  6.3% system,  0.0% interrupt, 88.0% idle
Mem: 73M Active, 18M Inact, 46M Wired, 8108K Cache, 25M Buf, 2572K Free
Swap: 384M Total, 106M Used, 278M Free, 27% Inuse

  PID USERNAME PRI NICE   SIZERES STATETIME   WCPUCPU COMMAND
   11 root 171   52 0K 8K RUN102.3H 86.82% 86.82% idle
  743 smithi960 26616K  2908K select 156:40  1.03%  1.03% kdeinit
  708 smithi960 34140K 15024K select 223:05  0.63%  0.63% Xorg
  644 root  960  1244K   244K select  30:19  0.05%  0.05% moused
  775 smithi200 11524K  1028K kserel 319:17  0.00%  0.00% xmms
  761 smithi960 30824K  7272K select  97:50  0.00%  0.00% kdeinit
   27 root  76  -43 0K 8K RUN 44:14  0.00%  0.00% swi5: clock s
  772 smithi960 29736K  5600K select  40:57  0.00%  0.00% kdeinit
  777 smithi 80  2300K   448K nanslp  36:20  0.00%  0.00% asapm
  778 smithi 80  2524K   460K nanslp  34:12  0.00%  0.00% ascpu
  767 smithi960 29448K  5612K select  29:23  0.00%  0.00% kdeinit
  771 smithi960 29884K  5504K select  22:28  0.00%  0.00% kdeinit
  616 mysql 200 50824K  1428K kserel  21:04  0.00%  0.00% mysqld
  759 smithi960 29644K  5092K select  20:56  0.00%  0.00% kdeinit
  773 smithi960 35640K  4080K select  20:39  0.00%  0.00% kdeinit
  766 smithi960 29488K  4768K select  19:07  0.00%  0.00% kdeinit
  764 smithi960 28784K  3964K select  16:38  0.00%  0.00% kdeinit
  774 smithi960 33168K  3768K select  16:36  0.00%  0.00% kdeinit
  757 smithi960 27272K  5508K select   4:55  0.00%  0.00% kdeinit
   23 root -60 -179 0K 8K WAIT 3:04  0.00%  0.00% irq12: psm0
   22 root -80 -199 0K 8K WAIT 3:02  0.00%  0.00% irq11: cbb0 c
   43 root  200 0K 8K syncer   3:00  0.00%  0.00% syncer
4 root  -80 0K 8K -2:58  0.00%  0.00% g_down
3 root  -80 0K 8K -2:30  0.00%  0.00% g_up
   49 root  120 0K 8K -2:09  0.00%  0.00% schedcpu
   30 root -160 0K 8K -1:53  0.00%  0.00% yarrow
   39 root -160 0K 8K psleep   1:30  0.00%  0.00% pagedaemon
   41 root 171   52 0K 8K pgzero   1:25  0.00%  0.00% pagezero
[..]

It never shows more than about 90% idle, whereas a 0.01 shorter term
load average should indicate more like 99% idle, shouldn't it?  97-99%,
sometimes 100% idle was what FreeBSD 4.5-R used to tell me with the same
workload in around the same memory use, but maybe 4.5 was optimistic .. 

 > > This is one TOP that freaked me out, notice Idle CPU is 70% while the
 > > process is showing it is using 99% of CPU. systat draws more accurate
 > > picture, however, load average is still useless as far as performance
 > > monitoring :
 > >
 > > last pid: 10174;  load averages:  1.63,  1.44,  1.20  up 4+00:25:19  
 > > 00:39:20
 > > 169 processes: 2 running, 166 sleeping, 1 zombie
 > > CPU states: 25.8% user,  0.0% nice,  0.7% system,  0.1% interrupt, 73.4% 
 > > idle
 > > Mem: 1316M Active, 1445M Inact, 297M Wired, 127M Cache, 112M Buf, 79M Free
 > > Swap: 8762M Total, 2096K Used, 8760M Free
 > >
 > >   PID USERNAME PRI NICE   SIZERES STATE  C   TIME   WCPUCPU COMMAND
 > > 13362 root 1110 36444K 34196K CPU3   3  50:06 98.88% 98.88% 
 > > perl5.8.7
 > > 90391 root  960 27356K 26236K select 2   0:06  0.54%  0.54% 
 > > perl5.8.7
 > > 79619 nobody 40   209M 84640K sbwait 1   0:09  0.39%  0.39% httpd
 > > 10161 root  970  6712K  4752K select 2   0:00  1.40%  0.20% 
 > > exim-4.62-0
 > > 79649 nobody200   210M 84464K lockf  0   0:06  0.15%  0.15% httpd
 > 
 > Apparently, you have a 4-CPU system :-)
 > 
 > What you see displayed as 

Re: Top not showing cpu usage even remotely accurately

2006-08-10 Thread Ian Smith
On Thu, 10 Aug 2006, Chuck Swiger wrote:
 > Ian Smith wrote:
 > > But since running 5.x (5.5-STABLE since 1st Aug) top can show 0.0% idle
 > > but the cpu usages shown don't add up to much of a fraction of 100%.
 > [ ... ]
 > > Any ideas why top hasn't much of a clue about what's consuming cpu? 
 > 
 > Sure, if you're running a parallel make, that will be starting up lots of 
 > short-lived compiler processes which exit quickly; top can only display the 
 > CPU load for those processes which are still running at the time it samples 
 > the system.

Spot on, thanks Chuck.  lastcomm showed a couple of thousand processes
run per minute during several hours of 'make index'; /var/account/acct
was nearly 10MB for that time.  Only one gcc but lots of sh, perl, grep,
awk, sed and such each running < 1 second, being a texty sort of job. 

Cheers, Ian

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


Top not showing cpu usage even remotely accurately

2006-08-09 Thread Ian Smith
In the past (FreeBSD 2.2, 3.3, 4.5 through 4.10) if I noticed unexpected
high cpu use, say on xload or ascpu, I'd just run top to determine what
the pig was, and kill it if something (usually netscape :) was wedged.

But since running 5.x (5.5-STABLE since 1st Aug) top can show 0.0% idle
but the cpu usages shown don't add up to much of a fraction of 100%.

For a typical illustration: 'make index' has been running for hours, and
here's a shot of 'nice top', o)rdered by cpu, showing S)ystem procs: 

last pid: 62397;  load averages:  2.06,  2.09,  2.13  up 3+03:57:39 13:11:27
154 processes: 6 running, 125 sleeping, 23 waiting
CPU states: 77.3% user,  0.0% nice, 22.7% system,  0.0% interrupt,  0.0% idle
Mem: 79M Active, 24M Inact, 37M Wired, 5640K Cache, 25M Buf, 3388K Free
Swap: 384M Total, 133M Used, 251M Free, 34% Inuse

  PID USERNAME PRI NICE   SIZERES STATETIME   WCPUCPU COMMAND
62380 root 1220   788K   648K RUN  0:01 19.48%  1.86% make
  736 smithi970 27000K  3184K select  89:56  1.07%  1.07% kdeinit
  762 smithi960 29708K  7428K select  14:01  0.93%  0.93% kdeinit
  699 smithi960 52320K 10288K select 105:02  0.88%  0.88% Xorg
62394 root 1250   580K   440K RUN  0:00  7.00%  0.34% make
  754 smithi960 30972K  6308K select  57:22  0.15%  0.15% kdeinit
  770 smithi 80  2524K   660K nanslp  20:51  0.05%  0.05% ascpu
   11 root 171   52 0K 8K RUN 60.4H  0.00%  0.00% idle
  760 smithi200 10636K  1404K kserel 187:08  0.00%  0.00% xmms
   27 root -28 -147 0K 8K RUN 27:50  0.00%  0.00% swi5: clock 
sio
  757 smithi960 28784K  4220K select  26:03  0.00%  0.00% kdeinit
  767 smithi960 29828K  5704K select  24:01  0.00%  0.00% kdeinit
28643 smithi200 71016K 30816K kserel  23:01  0.00%  0.00% mozilla-bin
  769 smithi 80  2300K   612K nanslp  21:23  0.00%  0.00% asapm
  639 root  960  1244K   364K select  17:02  0.00%  0.00% moused
  761 smithi960 29468K  5132K select  16:32  0.00%  0.00% kdeinit
  763 smithi960 36568K  5940K select  13:06  0.00%  0.00% kdeinit
  619 mysql 200 49800K  1528K kserel  12:27  0.00%  0.00% mysqld
  752 smithi960 29644K  4976K select  10:59  0.00%  0.00% kdeinit
  759 smithi960 28720K  4548K select   9:34  0.00%  0.00% kdeinit
15822 smithi 80  1488K   412K nanslp   4:30  0.00%  0.00% ephem
  750 smithi960 27304K  5316K select   3:03  0.00%  0.00% kdeinit
4 root  -80 0K 8K -1:50  0.00%  0.00% g_down
   23 root -60 -179 0K 8K WAIT 1:31  0.00%  0.00% irq12: psm0
3 root  -80 0K 8K -1:30  0.00%  0.00% g_up
   43 root  200 0K 8K syncer   1:28  0.00%  0.00% syncer
   49 root  120 0K 8K -1:16  0.00%  0.00% schedcpu
   30 root -160 0K 8K -1:06  0.00%  0.00% yarrow
   39 root -160 0K 8K psleep   0:56  0.00%  0.00% pagedaemon
   16 root -80 -199 0K 8K WAIT 0:48  0.00%  0.00% irq5: sbc0
2 root  -80 0K 8K -0:48  0.00%  0.00% g_event
   41 root 171   52 0K 8K RUN  0:46  0.00%  0.00% pagezero
   29 root -44 -163 0K 8K WAIT 0:26  0.00%  0.00% swi1: net
  545 root  960  9764K   492K select   0:21  0.00%  0.00% httpd
   25 root -64 -183 0K 8K WAIT 0:21  0.00%  0.00% irq14: ata0
   13 root -60 -179 0K 8K WAIT 0:18  0.00%  0.00% irq1: atkbd0
  490 root  960  3464K   744K select   0:17  0.00%  0.00% sendmail
[etc]

'ps auxww' cpu percentages reveal little more, except that make index is
running 'make -j2 ..' hence the ~2.0 load average.

Ignore the high swap use; most of it is numerous quiescent kwrite, httpd
and mozilla sessions pushed out to swap on this lil' 160MB laptop;
'systat -vm' shows it's not actually doing any paging during this time.

Any ideas why top hasn't much of a clue about what's consuming cpu? 

Cheers, Ian

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


Re: .bash_logout and shutdown -- need ideas

2006-08-05 Thread Ian Smith
On Fri, 4 Aug 2006 [EMAIL PROTECTED] wrote:

 > Message: 5
 > Date: Fri, 04 Aug 2006 19:38:12 +0200
 > From: Svein Halvor Halvorsen <[EMAIL PROTECTED]>
 > Subject: Re: .bash_logout and shutdown -- need ideas
 > To: DW <[EMAIL PROTECTED]>
 > Cc: freebsd-questions@freebsd.org
 > Message-ID: <[EMAIL PROTECTED]>
 > Content-Type: text/plain; charset="iso-8859-1"
 > 
 > DW wrote:
 > > Just started using a .bash_logout script to handle doing my unison
 > :
 > > The problem with that though, is that the shutdown process runs as root,
 > > and just drops the system, and I'm never actually getting logged out as
 > > much as booted out. So my .bash_logout doesn't run, and thus no unison
 > > unless I remember to run it manually first.
 > > 
 > > Any ideas on how to work around this sitch?
 > 
 > 
 > At shutdown FreeBSD runs /etc/rc.shutdown. It seems that this script, by
 > means of /etc/rc.subr, will iterate all the files in (among others)
 > /usr/local/etc/rc.d/ and call them with the "faststop" argument.
 > 
 > Maybe you could just add a script in there?
 > 
 > (Actually, only files with a "# PROVIDES" line are considered, it seems,
 > so you should think about that).

Also, DW was running 'sudo shutdown -p now' which is indeed immediate .. 
'shutdown -p +1' (say) sets the shutdown countdown to one minute, makes
(w)all sorts of noise then and again at (as I recall) 30 seconds to
zero, plenty of time to logout from other things and (auto)run any other
scripts you like before the shutdown-initiated rc.shutdown stuff. 

Furthermore, if you change your mind you've got time to kill shutdown
itself before the timeout.  'sudo killall shutdown' should do the trick.

Cheers, Ian

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


Re: Using extended partitions.. ?

2006-07-29 Thread Ian Smith
On Sat, 29 Jul 2006 [EMAIL PROTECTED] wrote:
 > Message: 15

 > Thanks all.  I  have XP and linux  share  the  xtended partition,  and
 >  now I want to say bye bye  linux (I  need  XP for worldwind  s/w) .

That's different then.  If you want to keep XP (and keep it within that
extended partition) then you can't delete the extended partition.  You
could use Partition Magic (ono) to delete the linux logical drive, then
shrink the extended partition to make space for another slice (maximum
of four), which is what you'll need for another UFS slice.

 > Ido not  see the extended  logical drives containing  ext3 from
 > sysinstall that  is the problem.

You won't - fdisk sees the four slices only, the 'extended partition'
being one of those entire, with it's specific type.

What does just 'fdisk' say? (you can do this anytime, it just lists)

The view from linux &| XP fdisk may be useful also.

 > The cmdline freebsd  fdisk feels  like  a  throw  back tp the  pdp-11 days :)

Definitely to be used with due care.  I generally prefer trusting
sysinstall to be good with the maths - but keep a beady eye on it too.

 > So I'm  going to  try and  mount  them  from bsd  below  my  home
 > folder,  without deleting them first... until I work  out  exactly how
 >  to  use  the fbsd fdiks  cmdline without  damaging  anything.

You can mount them, readonly anyway, knowing that the first 'logical
drive' within the 'extended partition' appears as ad0s5, the second as
ad0s6 etc, assuming ad0 of course. 

Cheers, Ian

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


Re: Using extended partitions.. ?

2006-07-29 Thread Ian Smith
On Fri, 28 Jul 2006 [EMAIL PROTECTED] wrote:

 > I've wanted to try  this for a  long time,  but  I believed  its  not
 > possible,  but  never  asked  anyone so
 > 
 > Is  it possible to have multiple freebsd slices (partitions)  on a
 > single disk ?  For  example, I  already got a  fbsd slice  with
 > partitions in it,  now  I  want to  add  another and  use that  space,
 > after deleting  a windoze partition.

Yes, with one caveat, below ..

 > What about using  an  extended  logical  partition  as  a freebsd  slice?

Nope.  Well, you can access them (eg as MSDOS or HPFS), but you cannot
install to them, and I don't think they can be UFS at all. Best delete
the 'logical drives' within and make a new primary slice.

 > I  am   quite comfortable  with  linus  fdisk, but  the  fbsd one
 > feels like the plauge to me.  Is  the  linux  port of fdisk a  better
 > choice?

I don't think that would work, or at least be useful.

 > I run all  my linux partitions  from within  ext-logical ones (all
 > but root) and  I want to   clear them and reuse them for freebsd.

Clear that space and make a FreeBSD slice; then allocate one or more
partitions in the new primary slice (aka DOS partition, confusing eh?)

One thing to watch out for (speaking from a rather nasty experience); if
the new slice is _before_ your installed FreeBSD slice, and you're using
sysinstall to fdisk/label the new partition, sysinstall might fancy that
the new slice is where you want to install FreeBSD, and start doing so. 

I once freed a logical partition containing some HPFS (OS/2) 'drives'
and even though I'd used 'W' and ESC to quit out of sysinstall, it began
a fresh installation in the (now first) FreeBSD slice.  Took some doing
to clean up that mess.  If the new slice is after your FreeBSD install
(or on another drive), you should have no worries even using sysinstall.

Cheers, Ian

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


Re: about freebsd partition problem

2006-06-19 Thread Ian Smith
On Mon, 12 Jun 2006 freebsd-questions Digest, Vol 138, Issue 5 wrote:

 > To: [EMAIL PROTECTED] (t s)

 > > my harddisk(40G FAT32) :
 > > c:\ (primary 10G windows XP root)

That's one slice (DOS: partition)

 > > d:\ (logical 5G with data)
 > > e:\ (logical 5G with data)
 > > f:\ (logical 10G with data)
 > > g:\ (logical 10G empty)

And all of those DOS logical drives are probably within slice (ad0s2)
Unless things have changed with XP, s/probably/certainly/

 > > so i want to release 500MB from "d:\" for the second primary partition
 > > and then put the freebsd "/" on it, the other put to "g:\" just like the
 > > belows:
 > > 
 > > windows xp mode
 > > c:\ (primary 10G windows XP root)

That much is fine, best (probably still essential) to have your DOS on
the first slice (DOS: partition) ad0s1.  Preferably FAT32 if you need to
read/write it from FreeBSD, but read-only NTFS is said to work.

 > > d:\ (logical 4.5G with data) > 500MB for freebsd "/" (second primary
 > > "ad0s2")

ad0s2 is the whole slice (DOS: primary partition) from which DOS logical
drives are allocated.  Here 'drive d:' might be mount_msdos'd as ad0s5,
e: as ad0s6 and f: as ad0s7 etc.  Weird but it works; this was how I got
to recover (ro was all I dared) previous OS/2 HPFS partitions years ago.

 > > e:\ (logical 5G with data)
 > > f:\ (logical 10G with data)
 > > cannot see the g:\ ==> used by /var /usr /swap

Do you (Steve) have a third slice ad0s3 allocated for /var /usr & swap? 

 > > is it ok??? but i don't know how to create the "ad0s2"??? and edit the g:\
 > > for /var, /usr, /swap???
 > 
 > Well, sort of OK.   I would not be inclined to put a FreeBSD slice
 > right in the middle of your MS logical drives.   But, I think you
 > could do it.   

I don't believe so, Jerry.  Unlike Linux, you can't install FreeBSD on
other than what BIOS/DOS calls a primary (MBR) partition, and we call a
slice (to save a message, I appreciated your upcoming FAQ about that!)

 > Secondly, I don't know what just having 500 MB for a FreeBSD '/' would
 > get you.   It would not be enough to run FreeBSD.   But, probably you
 > haven't told the whole story.   Something else must be there.  Anyway,
 > I would be inclined to take the FreeBSD slice out of that empty GB
 > space that currently shows up as g: on you Microsloth system.

Not unless it's another primary MBR / fdisk partition, but yes it's not
clear.  I'm not sure of the wisdom of only having / in one slice, and
/usr, /var (and swap) on another, though you can.  I'd use DOS fdisk to
remove one or more of those 'logical drives' then PM or something to
consolidate free space, and put FreeBSD on ad0s3, 10G at least :) 

 > > any disk edit tool can do it???
 > 
 > I have successfully used Partition Magic for this sort of thing.  
 > It is available at not too high a price from most places that
 > sell software.As long as all the MS stuff is FAT, I think
 > there are some free tools that will work too, but I haven't used
 > them so can not attest to their effectiveness or reliability.
 > A couple come with the FreeBSD distribution.   But, the free tools
 > do not handle NTFS which is why I haven't used them.

If Steve places much value on the data on other than his c: (ad0s1) then
investing in Partition Magic might be wise.  I've used presizer in
fingers-crossed mode to shrink whole-disk-as-C: setups, and it worked,
but there was nothing precious there.

 > You will first need to use the disk tool such as Partition Magic
 > to shrink the existing structures and put a new primary slice in
 > the space.   

Indeed.

 > Then, when you run the FreeBSD install, you have it mark the slice as 
 > a FreeBSD slice.  Up until that point, it is not really a FreeBSD ad0s2,
 > just some generic space.Partition Magic does not know how to mark
 > the slice (which it calls a primary partition, using MS terminology)
 > as a FreeBSD slice.So FreeBSD's fdisk does it.   (Even if you
 > use sysinstall to write the slice, it really just calls fdisk)

Yes, but if he wants to keep some of his 'logical drives' they'll stay
in ad0s2 (accessed as above as ad0s[567]) and ad0s3 will be FreeBSD, no?

Cheers, Ian

 > Good luck,
 > 
 > jerry 
 > 
 > > 
 > > thank you very much
 > > 
 > > steve (come from hong kong)

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


Re: Directory and file comparison tool for X?

2006-06-10 Thread Ian Smith
On Sat, 10 Jun 2006, Norberto Meijome wrote:

 > On Fri, 9 Jun 2006 20:56:17 +1000 (EST)
 > Ian Smith <[EMAIL PROTECTED]> wrote:

 > >  > I'm looking for a tool that will allow me to compare directories
 > >  > (recursively) showing what files are different,etc. meld ( 
 > > textproc/meld )
 > >  > can do this to some extent, showing missing files,etc, but not showing
 > >  > what files are different withoug having to open each file and do a diff.
 > > 
 > > Well of course 'diff -r dir1 dir2 | less' does that well in an xterm :)
 > > 
 > 
 > yeah, but it's just way too verbose. something that allows very quick
 > determination of differences / missing files, transfer them from one tree to
 > another,etc. Specially for LARGE trees.

A job for rsync, perhaps, if you want to automatically syncronise the
trees, rather than just review the diffs?  (caveat: I know very close to
nothing about rsync, beyond having reading its man xty-x times :)

 > > But I guess you're after a more pointy clicky solution :)
 > 
 > not because of point+click per se, but yes for faster overview of things.

I recall a wonderful OS/2 tool for this purpose .. ahem, moving on .. 

 > > % diff bittorrent/ bittorrent2/
 > > diff bittorrent/differingfile bittorrent2/differingfile
 > > 1,2c1,3
 > > < this one in bittorrent dir
[..]
 > 
 > yeah.. i tried this with 2 src trees with over 1.2 K  files each... it was 
 > way
 > too much to digest quickly :D

Ok, my last shot with good ol' diff, on the same filesets (this is news
to me too; I haven't explored many of the diff options much before): 

% diff -rq bittorrent/ bittorrent2/
Files bittorrent/differingfile and bittorrent2/differingfile differ
Only in bittorrent2/: not_in_1
Only in bittorrent/: not_in_2

For moving files between two trees, looks like a bit of scripting on -q
(--brief) output may get you there? Hopefully someone has a better idea? 

cheers, Ian

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


Re: phpMyAdmin problem - no Edit/Delete on Browse

2006-06-02 Thread Ian Smith
On Sun, 28 May 2006 at 18:26:46 +0100, Matthew Seaman wrote:
 > Ian Smith wrote:
 > > On Sun, 28 May 2006, Matthew Seaman wrote:
 > >  > Ian Smith wrote:
 > >  > > running 5.4-RELEASE and installed phpMyAdmin 2.6.1.3 with pkg_add -r
 > > [..]
 > 
 > You would be well advised to upgrade to the latest phpMyAdmin, which is
 > version 2.8.1, and is in the current ports. There are a number of security
 > problems that affect many earlier versions.  If you look at the list of
 > security announcements at http://www.phpmyadmin.net/home_page/security.php
 > then with version 2.6.1pl3 you're potentially vulnerable to anything 
 > announced
 > after PMASA-2005-1

It's good advice for sure, however not practicable at the moment.  As I
said, this laptop is not net-accessible, and I just needed to get a job
done.  According to the requirement list, I'd have to update php, expat,
mysql version! - surely a case of the tail wagging the dog? - and even
xorg, pretty much everything.  Not really doable on a 28.8k modem link. 

So, given my broadband application is on 'hold' awaiting local enabling
which might take months, I'm going for a 6.1 4-CD set as soon as they're
available; packages and/or distfiles is really the only way to go for
those (still many) parts of the planet without fast, cheap connections.

 > > Think I'll start again with the installed config.  I really can't recall
 > > if this problem was there since installation, but as mentioned all other
 > > import/export, create/drop/copy database/table, adding rows etc all just
 > > works well so far, excepting edit/delete availability on browse. 

I did start again from scratch; no difference.  Still can't believe that
such a show-stopper bug wouldn't have obviously affected many phpmyadmin
users on 5.4 - people do use it to edit records, don't they? - so still
have to suspect some local config issue.  Tried another browser and all.

 > I have a vague memory that I've seen something like this mentioned as a
 > bugfix in the release notes for phpMyAdmin, but I can't put my finger on
 > exactly where.  You can see the release notes for most phpMyAdmin versions
 > here:
 > 
 > https://sourceforge.net/project/showfiles.php?group_id=23067&package_id=16462
 > 
 > but the formatting is all wrong before the 2.8.x series.

Yes, read every one since 2.6.1; nothing that struck me as even similar.

Anyway, thankyou Matthew for your helpful advice and clues.

Cheers, Ian

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


Re: phpMyAdmin problem - no Edit/Delete on Browse

2006-05-28 Thread Ian Smith
On Sun, 28 May 2006, Matthew Seaman wrote:

 > Ian Smith wrote:
 > > running 5.4-RELEASE and installed phpMyAdmin 2.6.1.3 with pkg_add -r
[..]
 > >  mysql-client-4.1.10a Multithreaded SQL database (client)
 > >  mysql-server-4.1.10a Multithreaded SQL database (server)
 > >  php4-4.3.10_2   PHP Scripting Language (Apache Module and CLI)
 > >  phpMyAdmin-2.6.1.3  A set of PHP-scripts to manage MySQL over the web
[..]
 > > phpmyadmin basically works fine.  I'd imported my databases from dumps,
 > > and all looked good after a bit of configuration.  However when starting
 > > to do some real work on a couple of databases, I noticed that while
 > > browsing any database, the Edit and Delete options do not appear with
 > > each row, ie I can not update existing records (even as -u root)
 > > 
 > > I'd suspected permissions, but I can insert new records, add/drop/empty
 > > tables and databases, bookmark queries and all.  The permissions and
 > > ownership of and in /var/db/mysql are the same as my old 4.5-R system.
 > > 
 > > $cfg['ModifyDeleteAtLeft'] = TRUE; I've also tried adding ...AtRight as
 > > well, but neither show up.  If relevant, I'm using apache-1.3.33_1 and 
 > > mozilla-1.7.7,2 .. all of this is just running on the local machine, so
 > > I'm not at the moment concerned with just security-issue updates.
[..]

 > What is the UID *within* MySQL you are using to connect with?  Does
 > running:
 > 
 > SHOW GRANTS FOR [EMAIL PROTECTED] ;
 > 
 > make things any clearer?

Nope.  Show processlist confirms that I'm logged in as [EMAIL PROTECTED],
with an idle [EMAIL PROTECTED] process as well for bookmarks etc.

 SHOW GRANTS FOR [EMAIL PROTECTED];

 GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD
 '*A5obscured4C2EFF' WITH GRANT OPTION

 > phpMyAdmin is clever enough to modify its user interface according to what
 > the user has permission to do to the database.  The user name use within the
 > database depends on how you've configured phpMyAdmin -- I generally like to
 > use 'cookie' mode authentication where the username and password are passed
 > straight through to MySQL from the login dialog, but the 'config' mode given
 > in the example config files requires you to put the username and password
 > directly in the phpMyAdmin configuration file. 

Just using 'config' mode, user root so far; thought I'd tighten it up
properly for outside access after getting it doing some useful work!

Think I'll start again with the installed config.  I really can't recall
if this problem was there since installation, but as mentioned all other
import/export, create/drop/copy database/table, adding rows etc all just
works well so far, excepting edit/delete availability on browse. 

Thanks Matthew,

cheers, Ian

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


phpMyAdmin problem - no Edit/Delete on Browse

2006-05-27 Thread Ian Smith
(originally posted to -database some days ago .. no nibbles)

running 5.4-RELEASE and installed phpMyAdmin 2.6.1.3 with pkg_add -r
(after finding installing from ports wanted to also fetch php4 sources
and heaps of other stuff I already had installed from packages on the
2-CD set).  I'd managed to find and install 5.4-R mysql packages also:

 smithi on paqi% pkg_info | grep -i "php\|mysql"
 libmcrypt-2.5.7_1   Multi-cipher cryptographic library (used in PHP)
 mysql-client-4.1.10a Multithreaded SQL database (client)
 mysql-server-4.1.10a Multithreaded SQL database (server)
 php4-4.3.10_2   PHP Scripting Language (Apache Module and CLI)
 php4-bz2-4.3.10_2   The bz2 shared extension for php
 php4-gd-4.3.10_2The gd shared extension for php
 php4-mbstring-4.3.10_2 The mbstring shared extension for php
 php4-mcrypt-4.3.10_2 The mcrypt shared extension for php
 php4-mysql-4.3.10_2 The mysql shared extension for php
 php4-openssl-4.3.10_2 The openssl shared extension for php
 php4-pcre-4.3.10_2  The pcre shared extension for php
 php4-zlib-4.3.10_2  The zlib shared extension for php
 phpMyAdmin-2.6.1.3  A set of PHP-scripts to manage MySQL over the web

phpmyadmin basically works fine.  I'd imported my databases from dumps,
and all looked good after a bit of configuration.  However when starting
to do some real work on a couple of databases, I noticed that while
browsing any database, the Edit and Delete options do not appear with
each row, ie I can not update existing records (even as -u root)

I'd suspected permissions, but I can insert new records, add/drop/empty
tables and databases, bookmark queries and all.  The permissions and
ownership of and in /var/db/mysql are the same as my old 4.5-R system.

$cfg['ModifyDeleteAtLeft'] = TRUE; I've also tried adding ...AtRight as
well, but neither show up.  If relevant, I'm using apache-1.3.33_1 and 
mozilla-1.7.7,2 .. all of this is just running on the local machine, so
I'm not at the moment concerned with just security-issue updates.

I haven't been able to find anything in later version change notes or
PRs indicating anything like this problem, and updating to the current
port would require updating php, mysql, expat and even xorg versions,
which is just not doable over a 28.8k modem connection I'm afraid, so
the 'usual' answer of cvsuping and updating everything is not helpful;
in any case I suspect this is more likely a maybe subtle config issue?

Any clues folks?

cheers, Ian

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


Getting xmms to use glib-2

2006-05-02 Thread Ian Smith
On Tue, 2 May 2006 [EMAIL PROTECTED] wrote:

 > i've rebuilt everything that used glib-1.2* to use glib-2.10.* without a
 > problem, with the exception of xmms (multimedia/xmms). 
 > 
 > xmms keeps installing glib-1.2. Then, glib-config is run, shows the 1.2
 > version, which doesn't match the latest package (2.10.2, which does NOT
 > support glib-config, but pkg-config instead) and the whole build process 
 > bails
 > out (capture below).
 > 
 > Is it not possible to build  xmms with glib-2? 
 > I tried setting the env GLIB_CONFIG to 2.10.2 with no luck. 
 > 
 > Should I uninstall glib-2, install xmms with glib1.2, then reinstall glib-2? 

Beto, I don't know if this is a useful data point, but on 5.4-RELEASE I
recently installed xmms from ports, and recall it whinged about the glib
2.6.3 version already installed, but said (as I recall - wish I'd saved
the output) that it would build itself with glib-1.2 anyway, which I
assume it must have.  So I would up with both glibs installed:

paqi# pkg_info | grep "glib\|xmms"
glib-1.2.10_11  Some useful routines of C programming (previous stable vers
glib-2.6.3_1Some useful routines of C programming (current stable versi
taglib-1.3.1Library for manipulating ID3 tags and Ogg comments
xmms-1.2.10_3   X Multimedia System --- An audio player with a Winamp GUI

Older versions, I know, but xmms is working fine.

Cheers, Ian


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


Australian C'wealth Games Daylight Saving Time extension

2006-03-25 Thread Ian Smith
Not a question, but one answer for anyone else caught by the change to
the end of Daylight Saving Time in Australia a few hours ago, who hadn't
updated their /usr/share/zoneinfo/ data since, um, Feb 21st or so.

Yes, I was surprised to notice the clock move back an hour tonight, on
my 4.5-R laptop and a (yep!) 2.2.6 system I look after, not having heard
any usual reminders on TV/radio about DST changes.  Some googling found: 

 http://wpram.com/log/2006/03/04/commonwealth-games-daylight-saving/

which clear procedure I followed to the letter.  All better now.

Step 6 "FreeBSD users only: copy /usr/share/zoneinfo/Australia/Sydney to
/etc/localtime" wasn't appropriate on 4.5 and presumably? later systems,
/etc/localtime being a symlink to /usr/share/zoneinfo/Australia/Sydney
here anyway .. but it was the right advice for the old 2.2.6 beastie. 

cheers, Ian

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


Compaq Armada 1500c with ext USB drive

2006-01-19 Thread Ian Smith
[originally posted to -mobile 4 days ago, but I've had no response ..]

$subject running 4.5-RELEASE since 2002, no problems but perenially full
4GB drive and way-too-ancient wi for newer cards: past time to upgrade.  

5.4 CDs and new 40GB drive arriving in a few days.  In the meanwhile have
borrowed an external USB 2.5" 20GB drive for hopefully clean full backup,
but after much struggle and study I just can't get it to go despite USB
and SCSI attachment seeming fine.  Always, bottom line, 'Unit not ready'.

The external USB drive is recognised, attached and works fine on 2 'doze
boxes, a '98 desktop and a modern Compaq laptop running XP; on the former
I created a FAT32 first partition and copied a few files onto it.

Relevant extracts from dmesg.boot are below, but first I'll describe the
problem appearance; perhaps someone will recognise it straight up?  This
is using an added USB 4 port powered hub, the ext drive having an extra
power-only USB plug reportedly needed by some USB systems; no difference:

Jan 15 15:36:41 paqi /kernel: uhub1: Genesys Logic, Inc. USB2.0 Hub, class 9/0, 
rev 2.00/6.0b, addr 2
Jan 15 15:36:41 paqi /kernel: uhub1: 4 ports with 4 removable, self powered

Adding the drive:

Jan 15 15:40:18 paqi /kernel: umass0: Genesys Logic, Inc. USB TO IDE, rev 
2.00/0.02, addr 3
Jan 15 15:40:18 paqi /kernel: da0 at umass-sim0 bus 0 target 0 lun 0
Jan 15 15:40:18 paqi /kernel: da0:  Fixed Direct 
Access SCSI-0 device
Jan 15 15:40:18 paqi /kernel: da0: 650KB/s transfers
Jan 15 15:40:18 paqi /kernel: da0: 19077MB (39070080 512 byte sectors: 64H 
32S/T 19077C)

paqi# camcontrol rescan da0
Re-scan of bus 0 was successful

paqi# usbdevs -v
Controller /dev/usb0:
addr 1: self powered, config 1, UHCI root hub(0x), Intel(0x), rev 0x0100
 port 1 addr 2: self powered, config 1, USB2.0 Hub(0x0605), Genesys Logic, 
Inc.(0x05e3), rev 0x060b
  port 1 addr 3: self powered, config 1, USB TO IDE(0x0702), Genesys Logic, 
Inc.(0x05e3), rev 0x0002
  port 2 powered
  port 3 powered
  port 4 powered
 port 2 powered

paqi# camcontrol devlist -v
scbus0 on umass-sim0 bus 0:
  at scbus0 target 0 lun 0 (da0,pass0)
scbus-1 on xpt0 bus 0:
<  >   at scbus-1 target -1 lun -1 (xpt0)

paqi# camcontrol negotiate da0 -v
Current Parameters:
umass-sim0: SIM/HBA version: 1
umass-sim0: HBA engine count: 0
umass-sim0: maximum target: 32
umass-sim0: maximum LUN: 0
umass-sim0: highest path ID in subsystem: 0
umass-sim0: initiator ID: 32
umass-sim0: SIM vendor: FreeBSD
umass-sim0: HBA vendor: USB SCSI
umass-sim0: bus ID: 0
umass-sim0: base transfer speed: 65KB/sec

paqi# camcontrol tur da0
Unit is not ready

paqi# fdisk da0
fdisk: can't open device /dev/da0

Jan 15 15:45:33 paqi /kernel: (da0:umass-sim0:0:0:0): . CDB: 8 0 0 0 1 0
Jan 15 15:45:33 paqi /kernel: (da0:umass-sim0:0:0:0): ILLEGAL REQUEST asc:24,0
Jan 15 15:45:33 paqi /kernel: (da0:umass-sim0:0:0:0):
Jan 15 15:45:33 paqi /kernel: da0: reading primary partition table: error 
reading fsbn 0

.. which is what happens on any attempt to read from the drive.  I added
SCSI debugging to the kernel and can bombard you with voluminous reports
while having debug enabled, but it always comes back to the above; for
some reason the drive is not being made ready, or not being seen as such.

Any clues?

Cheers, Ian

=== relevant extracts from dmesg.boot ===

FreeBSD 4.5-RELEASE #1: Mon Dec 26 00:30:19 EST 2005
[EMAIL PROTECTED]:/usr/src/sys/compile/PAQI_2
Timecounter "i8254"  frequency 1193182 Hz
CPU: Pentium II/Pentium II Xeon/Celeron (300.01-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x66a  Stepping = 10
  
Features=0x183f9ff
real memory  = 167772160 (163840K bytes)
avail memory = 158973952 (155248K bytes)
Preloaded elf kernel "kernel" at 0xc0406000.

pcib0:  on motherboard
pci0:  on pcib0
isab0:  at device 7.0 on pci0
isa0:  on isab0
atapci0:  port 0x1020-0x102f at device 7.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
uhci0:  port 0x1000-0x101f irq 11 at 
device 7.2 on pci0
usb0:  on uhci0
usb0: USB revision 1.0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered

ad0: 4108MB  [8905/15/63] at ata0-master UDMA33
acd0: CDROM  at ata0-slave using PIO4
Mounting root from ufs:/dev/ad0s4a

===

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


Re: Difficulty asking questions

2006-01-16 Thread Ian Smith
Hi Bob.  I got the mail from your yahoo address too.

On Mon, 16 Jan 2006, Bob @ Brisbane wrote:

 > Received: from gargoyle.apana.org.au ([203.185.225.22])

As suspected, our sendmail was unable to reverse resolve this SMTP
sender's IP address, or it would have included it between the ()
brackets, see below.  That first gargoyle.apana.org.au string is just
the HELO gargoyle sent (which can be forged, but presumably isn't :) 

Our MX accepted your unresolvable address anyway (ie not blacklisted
specifically) but it appears that mx*.freebsd.org will not - or at
least your message didn't make the latest questions-digest received
here just recently.

 >  by gaia.nimnet.asn.au (8.8.8/8.8.8R1.4) with ESMTP id JAA07721
 >  for <[EMAIL PROTECTED]>; Mon, 16 Jan 2006 09:48:31 +1100 (EST)
 >  (envelope-from [EMAIL PROTECTED])
 > Received: from bob (jwillson.apana.org.au [203.3.126.224])

Whereas gargoyle, also a (later) sendmail, reverse resolved your box ok. 

 >  by gargoyle.apana.org.au (8.12.6/8.12.6) with SMTP id k0FMlwkk072910;
 >  Mon, 16 Jan 2006 08:47:58 +1000 (EST)
 >  (envelope-from [EMAIL PROTECTED])
 > Message-ID: <[EMAIL PROTECTED]>
 > From: "Bob @ Brisbane" <[EMAIL PROTECTED]>
 > To: "Ian Smith" <[EMAIL PROTECTED]>
 > Cc: <[EMAIL PROTECTED]>
 > References: <[EMAIL PROTECTED]>
 > Subject: Re: Difficulty asking questions
 > Date: Mon, 16 Jan 2006 08:48:29 +1000
[..]
 > X-Mailer: Microsoft Outlook Express 6.00.2900.2180
 > X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180

In this case, Outcast Distress is not the problem :)

 > This is from my apana address. I get both the item to me and also the one 
 > from the list.

Presumably because our reverse IP is working.  But apana's is not :(
Suggest contacting support etc ASAP.  Copy my mail to 'em if it helps.

Cheers, Ian

 > Bob Willson
 > - Original Message - 
 > From: "Ian Smith" <[EMAIL PROTECTED]>
 > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
 > Cc: <[EMAIL PROTECTED]>; "Micah" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
 > Sent: Monday, January 16, 2006 1:12 AM
 > Subject: Re: Difficulty asking questions
[..]

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


Re: Difficulty asking questions

2006-01-15 Thread Ian Smith
gday,

sending this to both of your addresses, and -questions.  You should get
three.  If you reply, esp from your apana address, I could check a) that
you can post to me at least :) and b) see what the headers suggest about
reverse IP resolution.

Micah said:

>I had the same problem, I could receive I just couldn't send to /any/
>freebsd.org list.  I can't track down the emails right now, but I
>believe it was either [EMAIL PROTECTED] or freebsd-questions-owner@
>who helped me figure out that my ISP had DNS issues.  With his help I
>emailed my ISP support line and they fixed their problem (I was
>surprised!)  So you should probably start by emailing one of the address
>I listed to see if they can help you track down your problem.

And Chris wrote:

>Normally this happens when your mail server doesnt reversly resolve to >the 
>domain name so if mail.i13i.com doesnt reverse to mail.i13i.com
>freebsd.org's mailing lists will reject the mail. As this happened when i
>was hosting my site using my DSL wasnt until i got a ded that i relaised
>what it was.

Seems the problem is indeed (at least temporarily) APANA's reverse DNS:

gaia: {301} dig -x 203.3.126.1

; <<>> DiG 2.2 <<>> -x
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 6
   
;; flags: qr rd ra; Ques: 1, Ans: 0, Auth: 0, Addit: 0
;; QUESTIONS:
;;  1.126.3.203.in-addr.arpa, type = ANY, class = IN

;; Total query time: 73580 msec
 ^
which most likely explains why freebsd.org's mx is ignoring your mail.

Probably worth mailing Matt Geier as suggested, and your local Brisbane
apana tech bods; I expect they'll want to know ..

Oh, it's worse than that .. ns.apana.org.au seems currently broken:

smithi on paqi% dig @ns.apana.org.au. -x 203.3.126.1
[..]
;; res_nsend to server ns.apana.org.au.  192.188.107.12: Operation timed
out

smithi on paqi% dig @ns.apana.org.au. apana.org.au
[..]
;; res_nsend to server ns.apana.org.au.  192.188.107.12: Operation timed
out

Trying another apana.org.au listed ns:

gaia: {304} dig @warrane.connect.com.au. -x 203.3.126.1
[..]
;; QUESTIONS:
;;  1.126.3.203.in-addr.arpa, type = ANY, class = IN

;; ANSWERS:
1.126.3.203.in-addr.arpa.   43200   RP support.brisbane.apana.org.au.
1.126.3.203.in-addr.arpa.   43200   TXT "APANA Brisbane"
1.126.3.203.in-addr.arpa.   43200   PTR gargoyle.apana.org.au.

;; AUTHORITY RECORDS:
126.3.203.in-addr.arpa. 43200   NS  yarrina.connect.com.au.
126.3.203.in-addr.arpa. 43200   NS  ns.apana.org.au.

;; ADDITIONAL RECORDS:
yarrina.connect.com.au. 3600A   192.189.54.17
ns.apana.org.au.3600A   192.188.107.12

.. but ns.apana.org.au fails to provide that PTR response right now ..
unless apana has _my_ server blacklisted of course :)

I'd be mailing that RP too (guess it's [EMAIL PROTECTED])

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


Re: Running mrtg on FreeBSD

2005-11-27 Thread Ian Smith
Re: freebsd-questions Digest, Vol 114, Issue 23
 > Message: 6

 > Date: Sun, 27 Nov 2005 05:25:26 -0500
 > From: "matt ." <[EMAIL PROTECTED]>

 > On 11/26/05, Glenn Dawson <[EMAIL PROTECTED]> wrote:
 > >
 > > At 05:24 PM 11/26/2005, matt . wrote
 > > I don't think it's a bug in the port.  I've installed it many times
 > > recently and not had any problems.
 > >
 > > What version of Perl are you using?  Version of FreeBSD?
 > >
 > > It looks as if the FindBin perl module is failing to find the correct
 > > location of the mrtg script, which then causes it to look for rateup
 > > in the wrong place.

Yes, specifically it seems to be returning '' instead of
'/usr/local/bin' which was to be prepended to '/rateup'

[.. system and perl versions ..]

 > The only thing the same is the version of my MRTG port.
 > 
 > I was unable to find the which module installs FindBin.  I checked
 > freshports.org and didn't find any port specifically related to anything
 > called FindBin.  Thanks.
 > 
 > matt

[..]

 > > > > Still seeing the same error.  I created /usr/local/www/mrtg owned by
 > > > > mrtg:mrtg.  I run the following in mrtg's crontab:
 > > > >
 > > > > */5 * * * * /usr/local/bin/mrtg /usr/local/etc/mrtg/mrtg.cfg
 > > > > --debug=cfg,dir --logging /var/log/mrtg.log
 > > > >
 > > > > And I see the debug check the config and dir structures ok:
 > > > >
 > > > > 2005-11-26 19:58:00 -- --dir: ensure path IN:  '/usr/local/www/mrtg'
 > > > > 2005-11-26 19:58:00 -- --dir: ensure path OUT: '/usr/local/www/mrtg/'
 > > > > 2005-11-26 19:58:00 -- --dir: imagehtml =
 > > > > 2005-11-26 19:58:00 -- Use of uninitialized value in concatenation (.)
 > > or
 > > > > string at /usr/local/bin/mrtg line 720.
 > > > > 2005-11-26 19:58:00 -- Use of uninitialized value in concatenation (.)
 > > or
 > > > > string at /usr/local/bin/mrtg line 720.
 > > > > 2005-11-26 19:58:00 -- ERROR: Can't Execute '/rateup'
 > > > >
 > > > > Still trying to execute /rateup.  This works flawlessly when run by
 > > root.
 > > > > I don't get it.

Smells like permissions, if root can, and mrtg:mrtg can't ..

 > > > > Here is line 720 of /usr/local/bin/mrtg:
 > > > >
 > > > > ((($MRTG_lib::OS eq 'NT' or $MRTG_lib::OS eq 'OS2') and (-e
 > > > > "${FindBin::Bin}${MRTG_lib::SL}rateup.exe")) or
 > > > >  (($MRTG_lib::OS eq 'NW') and (-e "SYS:/Mrtg/bin/rateup.nlm")) or
 > > > >  (-x "${FindBin::Bin}${MRTG_lib::SL}rateup")) or
 > > > >die "ERROR: Can't Execute
 > > > > '${FindBin::Bin}${MRTG_lib::SL}rateup'\n";

Assuming FindBin::Bin and/or MRTG-lib::SL doesn't need to run as root
(?), maybe not all of /usr, /usr/local and /usr/local/bin are world
readable/executable (o+rx), or maybe rateup itself isn't executable by
mrtg:mrtg?

Just a hunch, cheers, Ian

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


comms/mlan3 port woes [SOLVED (enough)]

2005-11-20 Thread Ian Smith
Following myself up (gulp):

> http://www.freebsd.org/cgi/cvsweb.cgi/ports/comms/mlan3/files/patch-aa?rev=1.2&content-type=text/x-cvsweb-markup
> 
> I can *almost* see what needs doing to patch-aa to hopefully fix the
> broken make for the thermo programs, cloned from other subdir Makefiles,
> but I don't know how to go about fixing that, where to put things, or how
> to generate an updated patch file and apply it.

I spent Sunday afternoon amongst the Porter's Handbook and bsd.*.make
files, learning enough to move some stuff around, hack some Makefiles, rm
dross and restart from 'make build' to compile the 2 ThermoCron programs.

Still have no idea how to generate a proper patch to do that, but I can
outline what I did and when, offlist, should anybody else be in need ..

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


comms/mlan3 port woes

2005-11-19 Thread Ian Smith
Hello,

I've been lent a couple of DS1921 ThermoCron iButtons and serial reader
for a while, so installed mlan3 (mlan3-1.00) as a package.  tstfind finds
and lists the ibuttons ok, but the thermocron programs (thermodl and
thermoms) are not included, though I'd noticed them in the sources.

So I had a look at the port, found the patch-aa file is all wrong for the
thermo make (and another in the apps suite, swtloop).  Then had a look at
phk's earlier mlan port and sure enough, the two wanted programs are in
its pkg-plist, so I installed package mlan-1.03 .. and they work fine ..

paqi# thermodl /dev/cuaa0 | grep -v \[EC\]\[nl\] | tail -7
12/25/2041  23:26 ,  27.0
12/26/2041  00:26 ,  26.0
12/26/2041  01:26 ,  25.0
12/26/2041  02:26 ,  24.0
12/26/2041  03:26 ,  23.5
12/26/2041  04:26 ,  23.0

paqi# thermodl /dev/cuaa0 /f | grep -v \[EC\]\[nl\] | tail -7
12/25/2041  23:26 ,  80.6
12/26/2041  00:26 ,  78.8
12/26/2041  01:26 ,  77.0
12/26/2041  02:26 ,  75.2
12/26/2041  03:26 ,  74.3
12/26/2041  04:26 ,  73.4

.. except those dates and times could really benefit from the Y2K patches
mentioned in the mlan3 sources :) Log data with bad timestamps is useless
as I want to scoop these logs into a database, preferably without having
to write a date-conversion filter (though that's my last recourse).

I've also successfully run thermoms, the 'missioning' program, which
thankfully doesn't reprogram the thermocron's RTC to weird(er) times.

So I'm stuck; searched the freebsd-ports list archives, and only came up
with someone else in '04 having the same problem, with no response.

This a 4.5-R box, but I've checked; apart from an 'unbreak on 5.x' patch
there are no changes with respect to the missing programs' Makefiles:

http://www.freebsd.org/cgi/cvsweb.cgi/ports/comms/mlan3/files/patch-aa?rev=1.2&content-type=text/x-cvsweb-markup

I can *almost* see what needs doing to patch-aa to hopefully fix the
broken make for the thermo programs, cloned from other subdir Makefiles,
but I don't know how to go about fixing that, where to put things, or how
to generate an updated patch file and apply it.

Perhaps these two didn't build right for the mlan3 porter? (hm@)  I don't
want to spend too much time if they still aren't going to build, or work.

Can anyone help, or advise?

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


strange msg lines..

2005-11-17 Thread Ian Smith
Re: freebsd-questions Digest, Vol 113, Issue 12
 > Message: 28
 > Date: Wed, 16 Nov 2005 23:56:06 +0100
 > From: dick hoogendijk <[EMAIL PROTECTED]>

 > I get a lot of these rules in my log file lately. Don't know why they
 > are not logged in the error.log file. And if they are harmful or not.
 > 
 > ==--==
 > 83.30.48.99 - - [16/Nov/2005:23:44:18 +0100] "GET / HTTP/1.1" 200
 > 1860 "http://puttane-grandi-tette.com"; "Mozilla/4.0 (compatible; MSIE
 > 6.0b; Windows NT 5.0; .NET CLR 1.0.2914)" 

 > 85.106.229.37 - - [16/Nov/2005:23:44:24 +0100] "GET / HTTP/1.1" 200
 > 1860 "http://hosting-siti-adulti.com"; "Mozilla/4.0 (compatible; MSIE
 > 6.0b; Windows NT 5.0; .NET CLR 1.0.2914)" 

[.. etc ..]

I've seen Dinesh's reply, and your later response, but I've seen batches
of these at various times too, and think it's something other than DNS
(though it did look like maybe a test of a distributed fetch, many IPs)

 > These are not normal requests to my apache server. But it seems to
 > "listen" to them. Am I 'in danger?'

No, they're not errors, they're just requests for your home page (GET /) 
which is presumably 1860 bytes .. the Referer (sic) in each case is one
of these apparent porn sites, but could easily be forged - it's unlikely
that the pages at the URLs given do in fact have any link to your site;
more than likely they want you go check out their stuff looking for one! 

So there's no danger involved, unless there are enough of them to DoS
your server.  I tend to deal with such as these by blocking them in
apache|httpd.conf so they just get a 403 access denied response, eg:

 # 1/3/5 multiple browsers, multiple IPs, all the same referrer:
 SetEnvIfNoCase Referer buy-vicodin-online\.us go_away

or in this other case, various different GETs attempting to access
various porn URLs as wannabe proxy requests, all from the one IP:

 # 6/10/5 porn link referers regularly, different browsers ..
 SetEnvIf Remote_Addr 209\.172\.35\.44 go_away

In your case, the browser identification, most likely bogus, is a common
factor in each, and could be blocked with such as: 

BrowserMatch "Mozilla/4\.0 \(compatible; MSIE 6\.0b; Windows NT 5\.0; \.NET CLR 
1\.0\.2914\)" go_away

or some unique part of that string.  whereas others as above will cycle
through different browser strings - there's usually some common thread
to such bot-made requests.  I only hit on them when they become annoying
(but sometimes I'm easily annoyed :)

Then of course you'd need something along the lines of:


  [.. other stuff ..]
  # 18Mar02 - allow only this file to otherwise denied bots
  
order allow,deny
allow from all
  
  order allow,deny
  allow from all
  deny from env=go_away


Cheers, Ian

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


Re: Cellular Modem, PPP, and FreeBSD

2005-10-26 Thread Ian Smith
Hi Jordon,

This was posted to -net, but I suspect -questions is more appropriate.

On Wed, 26 Oct 2005, Jordon Hofer wrote:

 > Greetings.  I am running a stripped down version of FreeBSD 4.11 on an
 > embedded x86 board.  I have an embedded cellular modem module (from
 > MultiTech) that is attached to the serial port (going through the necessary
 > RS232-TTL chip).  I am using PPP to connect to the Internet through verizon.
 > Everything works well until the connection gets interrupted.  I am using
 > ddial mode, so if the connection drops, it will redial.  From the logs, I
 > can see that PPP tries to redial, but after the initial connection, the
 > modem does not respond to any at commands.  If I power-cycle the modem, it
 > will connect just fine the next time PPP tries to reconnect.

Sounds like your modem isn't setup to automatically reset (ie, run ATZ) 
on a disconnect.  Some Multitechs have had weird command sequences over
the years, so I don't know the extent to which it it runs 'standard'
Hayes-type AT commands, but &D2 is most likely what you need.

&D2 causes a reset (ATZ) on lowering of the DTR line.  For this to work
properly your serial port must be driving DTR correctly, ie be setup
for 'hardware handshaking'.  You might want to test DTR with a meter?

Failing DTR reset working properly, if the modem is stuck in data mode,
you can have your initialisation send a  '+++'  sequence
to get the modem back into command mode (returning 'OK'), then send ATZ
plus whatever init string you need, but this is last resort measure. 
mgetty, for example, does this if lowering DTR has failed to evoke an
'OK' modem response, after a call on inbound modems. 

 > I realize that there is a good chance that the problem is in the modem.  I
 > am just wondering if there are any cases where you need a special chat
 > script to handle disconnects to return the modem to a clean state.

If the modem is configured correctly, and your serial port control lines
are working as they should, it should go.  Perhaps play around with the
modem using tip(1); see also modems(5), or use another terminal program.

Then if you're still in trouble, maybe post your modem init string from
ppp.conf, and perhaps a dump of your modem settings after an ATZ .. AT&V
will do this for most modems, but check your particular modem's manual.

Cheers, Ian 

 > Also, if there is a better group for this, please let me know.
 > 
 > Thanks.
 > 
 > 
 > Jordon Hofer
 > Dir. Software Engineering
 > AgSense LLC

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


RE: Serial Port data dumping program

2005-09-09 Thread Ian Smith
Hi Paul,

catching up on a week's digests .. and seeig no further messages on this
topic so far, I don't know whether you've sorted this out yet.  Anyway..

 > Message: 20
 > Date: Mon, 5 Sep 2005 17:32:41 +0800
 > From: "Paul Hamilton" <[EMAIL PROTECTED]>
 > Subject: RE: Serial Port data dumping program
 > To: "'Glenn Dawson'" <[EMAIL PROTECTED]>,
 >  
[..]
 > > -Original Message-
 > > From: [EMAIL PROTECTED] 
 > > [mailto:[EMAIL PROTECTED] On Behalf Of Glenn Dawson
 > > Sent: Monday, 5 September 2005 5:19 PM
 > > To: Paul Hamilton; freebsd-questions@freebsd.org
 > > Subject: Re: Serial Port data dumping program
 > > 
 > > 
 > > At 01:08 AM 9/5/2005, Paul Hamilton wrote:
 > > >Hi,
 > > >
 > > >I am trying to debug a Mini SSC FreeBSD program that I am trying to 
 > > >write. It would be nice to be able to be able to see what is being 
 > > >transmitted.  It would help in the debugging of my program.
 > > >
 > > >Here is a link to a Windows based Mini SSC program: 
 > > >http://www.rentron.com/Mini-ssc.htm  Using this, I can control the 
 > > >servo, so I know the hardware and cables work etc.
 > > >
 > > >I have been using the 'minicom' port to dump the received data.  

I guess you mean the _transmitted_ data, right?  I just grabbed the
manual at http://www.seetron.com/pdf/ssc2_mnl.pdf and note that the
board only _receives_ command data packets.

 > > >However, it doesn't seem to collect the data properly.  Data 
 > > coming in 
 > > >should be in accordance with the SSC protocol, ie:
 > > >
 > > >byte 1:0xFF// sync byte
 > > >
 > > >byte 2:   0x01 - 0x25f//servo address
 > > 
 > > How do you fit 0x25f into a single byte? (I count 10 bits required)
 > > 
 > 
 > Yep, a typo, should have been:  0xff

Well, it should be 0-7 (for 1 board, 8-15 for a second board, etc)

 > > >byte 3:   0x00 - 0x255   // servo position
 > > 
 > > Same question as above.
 > 
 > Brain thinking in hex, fingers working in decimal ;-)

Actually it's 0-254 (0x00 - 0xfe) .. 0xff would be another sync byte. 

 > > >Here is a dump of the collected data (via minicom):
 > > >
 > > >#hexdump  minicom.cap
 > > >000 45ff 49ff 4cff 50ff 53ff 57ff 5aff 57ff
 > > >010 53ff 50ff 4cff 49ff 45ff 45ff 01ff ff82
 > > >020 8101 01ff ff80 8202 02ff ff81 8002 03ff
 > > >030 ff83 8203 03ff ff81 8003 7fff 7fff 7eff
 > > >040 01ff ff7f 7f02 03ff ff7f ff7f 8001 02ff
 > > >050 ff80 8003 04ff ff80 ff80 8006 07ff 0080
 > > >
 > > >Looking at the first row of data, it is only showing two bytes, sync 
 > > >and servo position.  Rows 020 and 030, shows some servo 
 > > addresses, but 
 > > >sometimes, together!  Both the mini-ssc.exe and minicom program are 
 > > >using 9600 8n1, so why is it showing this?  Is there 
 > > something I have 
 > > >missed in the setup of minicom?  Looks like this is a serial buffer 
 > > >problem.

Maybe flow control?  Is the serial port's UART programmed to ignore
CTS/RTS, and/or DTR/DSR?  You say you've only wired signal ground, and
TxD to RxD, but you 'normally' can't transmit unless CTS is asserted
(say, by RTS), may need DTR/DSR too, and perhaps expect DCD to receive?
I don't really get what you're doing with minicom - are you receiving
the data on another port, or just echoing your transmitted data back?

 > > You probably have byte ordering issues.  Does something like this 
 > > look more reasonable?
 > > 
 > > 000 ff45 ff49 ff4c ff50 ff53 ff57 ff5a ff57
 > > 010 ff53 ff50 ff4c ff49 ff45 ff45 ff01 82ff
 > > 020 0181 ff01 80ff 0282 ff02 81ff 0280 ff03
 > > 030 83ff 0382 ff03 81ff 0380 ff7f ff7f ff7e
 > > 040 ff01 7fff 027f ff03 7fff 7fff 0180 ff02
 > > 050 80ff 0380 ff04 80ff 80ff 0680 ff07 8000
 > > 
 > > -Glenn
 > 
 > Yes, somewhat better, but still missing bytes here and there, ie. First
 > line, all the servo address bytes etc.
 > 
 > Why would the bytes be swapped around?

Seems that's just hexdump displaying 16-bit values byteswapped.  'hd'
may give you a more useful display order, as it's truly 8 bit data:

paqi% hexdump
fgjdg kj
^D
000 6766 646a 2067 6a6b 000a
009

paqi% hd
fgjdg kj
^D
  66 67 6a 64 67 20 6b 6a  0a   |fgjdg kj.|
0009

 > > >Is there a better program I could use to display the incoming serial 
 > > >data in hex?

hd :)  Again, you mean a reflection of your outgoing data, don't you?

 > > >NOTE:  I only use two wires, signal ground and Tx Data (connected to 
 > > >the Rx Data).  The servo does respond correctly, so I know 
 > > the serial 
 > > >data must be in the correct 3 byte format.

You could try 2 stop bits - they say one or more.

In the second example program in (good grief!) QBASIC in the above PDF
manual, they begin by initialising the serial port thus: 

 OPEN "com1:9600,N,8,1,CD0,CS0,DS0,OP0" FOR OUTPUT AS #1;

I gather CD0 means ignore DCD, CS0 ignore CTS, DS0 ignore DSR; don't
know about OP0.  Seems you need no flow control, or null-modem wiring?

Cheers, Ian


Re: Help on bash script?

2005-08-13 Thread Ian Smith
On Sat, 13 Aug 2005, Giorgos Keramidas wrote:

 > On 2005-08-12 13:38, Benson Wong <[EMAIL PROTECTED]> wrote:
 > > I prefer:
 > >
 > > for COREFILE in `find / -type f -name core -print`
 > > do
 > >   ...
 > > done
 > >
 > > Wouldn't that accomplish the same thing?
 > 
 > More or less.  Less, when the filenames are too many.  See questions
 > posted on this very same list about ``too many arguments''.

True.  Of course if you've got that many core files lying around, you
probably have other things to worry about :)

 > The ``while read line; do stuff with $line; done'' loop doesn't suffer
 > from the same limitation, but is a bit more expensive in terms of the
 > number of spawned processes and (consequently) the time it takes to run.

Maybe measurable.  Took me ages to appreciate the difference between say

   cat tempfile | while read line; do stuff with $line; done
and
   while read line; do stuff with $line; done < tempfile

when 'stuff' needs to update script-scope variables, despite a slightly
icky, impure feeling about using tempfiles .. 

cheers, Ian

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


Help on bash script?

2005-08-12 Thread Ian Smith
On Fri 12 Aug 2005 09:33:54 +0800 Xu Qiang <[EMAIL PROTECTED]> wrote:

 >  find / -type f -name core -print | while read COREFILE ; do
 >  NCOREFILES=$[ $NCOREFILES + 1 ] # a bit strange - xq
 >  echo $NCOREFILES # xq
 > 
 >  NEWNAME="${HOSTNAME}esscore${NCOREFILES}_${TIMESTAMP}"
 >  # record mapping so people can go back and figure out
 >  # where they came from
 >  echo -e $NEWNAME "was" `ls -l $COREFILE` >> 
 > $SAVE_DIR/$CORELOG
 >  mv $COREFILE $SAVE_DIR/$NEWNAME
 > 
 >  echo "There are $NCOREFILES core files." # xq
 >  done
 > 
 >  fi
 > 
 >  # What confused me most is the value $NCOREFILES outside 
 >  # the do-while loop (but still in this function) reverted 
 >  # back to its initial value, which seems contradictory to 
 >  # our concept of local variables. - xq
 >  #echo $NCOREFILES 

It's been pointed out that the find piped to while runs in a subshell,
and that changes to variables within aren't seen by its parent, but one
way around this is to avoid using a pipe, thus a subshell, for instance:

find / -type f -name "*.core" -print >tempfile
while read COREFILE; do
[.. stuff ..]
NCOREFILES=$(($NCOREFILES + 1))
done http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: installing a HP Photosmart 7350 usb printer

2005-08-04 Thread Ian Smith
[Re: freebsd-questions Digest, Vol 106, Issue 8]

 > System : 5.4-REL-#6
 > 
 > I've installed cups (via ports) and downloaded the .ppd file from 
 > linuxprinting.org so I could use it in the kde-printer wizard. No problem so 
 > far. I can see and modify the settings also via localhost:631. When 
 > printing, 
 > the cups error-log sais : "stopped with status 2 !". So I've changed the 
 > level to debug (see below pls). The file gets in /var/spool/cups/ but 
 > nothing 
 > gets printed on paper :-(
 > 
 > What still goes wrong ? Thx for any help.

If you haven't got it sorted yet, I did notice amongst the debug output: 

 > I [03/Aug/2005:16:16:34 +0200] Job 8 queued on 'HPPhotosmart7350' by 'beni'.

[..]

 > D [03/Aug/2005:16:16:34 +0200] 
 > start_process("/usr/local/libexec/cups/filter/pstops", 0xbfbef340, 
 > 0xbfbee6b0, 10, 12, 9)
 > I [03/Aug/2005:16:16:34 +0200] Started 
 > filter /usr/local/libexec/cups/filter/pstops (PID 17668) for job 8.

 > D [03/Aug/2005:16:16:34 +0200] StartJob: filter = 
 > "/usr/local/libexec/cups/filter/foomatic-rip"

 > D [03/Aug/2005:16:16:34 +0200] StartJob: filterfds[1] = [ 10 13 ]
 > D [03/Aug/2005:16:16:34 +0200] 
 > start_process("/usr/local/libexec/cups/filter/foomatic-rip", 0xbfbef340, 
 > 0xbfbee6b0, 11, 13, 9)
 > I [03/Aug/2005:16:16:34 +0200] Started 
 > filter /usr/local/libexec/cups/filter/foomatic-rip (PID 17669) for job 8.

[..]

 > D [03/Aug/2005:16:16:34 +0200] [Job 
 > 8] /usr/local/libexec/cups/filter/foomatic-rip: No such file or directory

[..]

 > D [03/Aug/2005:16:16:34 +0200] [Job 8] 0 %%BoundingBox: 0 0 595 842
 > D [03/Aug/2005:16:16:34 +0200] [Job 8] 0 %%Creator: KDE 3.4.1 HTML Library
[..]
 > D [03/Aug/2005:16:16:34 +0200] [Job 8] 0 %%BeginPageSetup
 > D [03/Aug/2005:16:16:34 +0200] [Job 8] 0 %%EndPageSetup
 > D [03/Aug/2005:16:16:34 +0200] [Job 8] 0 %%Trailer
 > D [03/Aug/2005:16:16:34 +0200] [Job 8] Saw Trailer!
 > D [03/Aug/2005:16:16:34 +0200] [Job 8] Saw EOF!

 > E [03/Aug/2005:16:16:35 +0200] PID 17669 stopped with status 2!

 > D [03/Aug/2005:16:16:35 +0200] UpdateJob: job 8, file 0 is complete.
 > D [03/Aug/2005:16:16:35 +0200] CancelJob: id = 8
 > D [03/Aug/2005:16:16:35 +0200] StopJob: id = 8, force = 0
 > D [03/Aug/2005:16:16:35 +0200] StopJob: printer state is 3

It's not clear whether "/usr/local/libexec/cups/filter/foomatic-rip: No
such file or directory" means that the file foomatic-rip is missing, or
that foomatic-rip can't find a file it needs, but either way, trouble!

cheers, Ian

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


<    1   2   3   4   5   6   >