We have an rc.conf file that looks something like this:
ifconfig_nfe0=UP
ifconfig_nfe1=UP
cloned_interfaces=lagg0
ifconfig_lagg0=laggproto failover laggport nfe0 laggport nfe1 ip
netmask mask
defaultrouter=router-ip
...
ourapp_enable=YES
In a recent reboot test, when ourapp started,
rc.conf is just a script that sets a bunch of environment variables for
the
/etc/rc.d/* scripts to use. The order the variables are set in that
file
does not matter. If you want your script to run after network
interfaces
are set up, you'll want to add a REQUIRE: NETWORKING line. See the
rc and
path, even though we have an IP defined in rc.conf.
We're trying to understand how this could happen and are wondering how
the options in rc.conf are processed.
-Original Message-
From: Jason [mailto:jhelf...@e-e.com]
Sent: Monday, July 27, 2009 2:44 PM
To: Peter Steele
Cc: freebsd-questions
Is there an alternative to Diablo JDK for FreeBSD-64? We've been using
this port for a while and it works fine, but some of the tools available
in Java distributions for other platforms are not fully implemented in
the Diablo port. We're particularly interested in the memory profiling
tool jmap.
There's java/jdk16 and the java/openjdk6 ports. However, I don't know
whether they support jmap or not.
The jmap tool in java/jdk16 doesn't appear to be complete either. Has
anyone successfully built openjdk6 for FreeBSD?
___
good but seems quite overcomplex expecially this pkg_add.
why just not to compress whole filesystem(s) by tar+gzip?
?
I think we must be talking about something different. In any event, what
we have works quite well and I'm not about to change the process at this
point...
I think he's refering to dumping the partitions of an already
installed master system into files, and then restoring them
into the partitions of the other systems as intended. This
would surely be easier than to pkg_add the software needed on
the other systems...
We do follow that general
It depends on the watchdog hardware itself. Some are not able to
handle long timeouts. Check the man pages for the hardware you are
using. The VIA hardware that we hacked a driver for said it could go
upto 512 seconds, but we could not get to that length
http://www.tancsa.com/watchdog/
Thanks
Wouldn't it look like
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/mirror/gm0d 4058062 -377792 4111210 110%/tmp
/dev/mirror/gm0e 15231278 -113942 14126718 101%/var
then? I always assumed that a disk occupation 100% would go into
this
did you checked that partitions with fsck? (fsck_ffs -y)
does it detects errors and fix them?
after fsck is it ok or still nonsense in Used?
Unfortunately I did not do the fsck. We have an automated reimaging
process that lets me rebuild a system in less than five minutes so I
decided for
How this reimaging work if i may ask? bootable DVD with unix and
script
that do zcat [partition image.gz] /dev/partition
We have a two step process. First we run a script that creates the
master image as a tgz. The image is created at an alternate root using
the -C option of pkg_add and the
I know I could have a script that continually checks gmirror status to
detect when a gmirror synchronization has completed, but is there a more
event-driven approach? Something that could be used to trigger and event
like devd does for drive pulls/inserts would be nice. Is this possible?
I've seen this kind of thing appear in my df output:
# df
Filesystem 1K-blocksUsed Avail Capacity Mounted on
/dev/mirror/gm0a 5077038 1685050 298582636%/
devfs 1 1 0 100%/dev
linprocfs 4 4
What's the proper way to configure the watchdog timer service so that a
system will automatically reboot after five minutes of
non-responsiveness? I tried setting watchdog to run with the args -s 10
-t 300, but I've seen systems reboot after only a few seconds of
inactivity (such as being hung on
$ echo ${X} ${Z}
bash: ${Z}: ambiguous redirect
I want to append all variables in X and Y into Z so that echo $Z
should be:
XX1=YES XX2=YES YY1=YES YY2=YES
Redirection is not the right way to do it. Just do this:
$ Z=$X $Y
$ echo $Z
XX1=YES XX2=YES YY1=YES YY2=YES
I create a thread using something like this:
pthread_t thread;
pthread_create(thread, NULL, mythread, NULL);
pthread_detach(thread);
I use the detach because I want to make sure the thread's resource are
reclaimed when the thread completes. However, this does not seem to work. Each
time I
I should have provided a little more detail. Even if I strip my thread function
down to nothing more than this:
void *mythread(void* param)
{
pthread_exit(NULL);
}
my application still grows by 128 bytes each time I spawn a thread with this
function. There is no explicit memory for me to
If I add a loop to your main() function, and add your missing
pthread_detach() call, here's the memory usage I see on each iteration:
That was a typo in my posting. I in fact did use pthread_detach; the line got
deleted as I was composing my email.
So it reached a steady state after 5 loops.
The pthread_* calls you are making aren't listed as being safe to run
within the context of a signal handler, and could cause a thread
waiting on that condition to be unblocked and start running. Please
see earlier comments about mixing threads and signal handlers.
Okay, fair enough. I'll
Under what circumstances might a kill -2 nnn not work. I have a Python app
with a signal handler configured to catch INT signals. It seems to work fine,
but we've recently noticed that after the app has run for a while the kill -2
no longer works. This seems pretty suspicious, perhaps
Any ideas?
I can't offer any solutions but I can tell you that we've seen this exactly
problem, and many times. I have a script that copies a tar image into a USB
thumb drive and that operation fails frequently. To better guarantee success, I
have to boot the system first, and then the copy
The amount of stuff you're allowed to do safely in a signal handler is
pretty minimal-- you're better off setting a flag, returning from the
signal handler, and having the next run past the main event loop or
whatever check for the flag and handle things in a normal app
context. If you try to
You're not trying to send a signal within the signal handler itself,
are you? That won't work-- signal delivery is blocked when you're
already running in a signal handler. Also, note that trying to mix
signals with a multithreaded process is complicated
No, I'm not sending a signal within
I just noticed my 7.2-R i386 PC-Engines ALIX2 board with vr devices show up
(WOL_UCAST,WOL_MAGIC) in the ifconfig listing. Seems they're making some of
it available in 7.2-RELEASE
I'll have to test/try this out, I'm glad I'm starting to see it happen.
Unfortunately we're pretty much stuck
Tim, I know nothing about WOL on FreeBSD, but according to the wiki,
development just started in 8 CURRENT:
http://wiki.freebsd.org/WakeOnLan
I came across that same reference. Unfortunately we're stuck on 7.0. I take it
the point of the wol command that available in the ports collection is
FUD, read ifconfig(8)
There is no mention of wake-on-LAN in the man page for ifconfig in 7.0. I'd be
interested in seeing if the 8.0 man page has added anything.
___
freebsd-questions@freebsd.org mailing list
In some cases (depending on the NIC and the BIOS) WOL works even without
OS support. It might be worth testing before you do anything else.
I've tried various experiments with the wol command to try to wake up one of
our boxes with no luck. We're using the stock nVidia driver. There is also no
Has anyone successfully used the wake-on-LAN tool wol to wake-up a FreeBSD
system? If yes, what NICs did you need to use to get this to work?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To
Long story short: Wake-on-LAN requires OS/NIC driver support. The OS puts the
NIC in a mode at shutdown that allows Wake-on-LAN to work. FreeBSD has no
Wake-on-LAN driver support, hence, no host running FreeBSD has Wake-on-LAN
capabilities.
I'm shocked that the Intel NICs don't have
i think it's a bug but only happens with such massive mirror. very few
people do more than 2-way mirrors that's probably it wasn't catched.
please do report the bug - it's critical.
In fact I just confirmed that if we reduce our mirror to just two members the
problem does not occur. The
We had a somewhat startling scenario occur with gmirror. We have systems with
four drives ad4, ad6, ad8, and ad10, with the OS setup on a mirrored slice
across all four drives. The ad4 drive failed at one point, due to a simple bad
connection in its drive bay. While it was offline, the system
This definitely looks like a bug. Try asking again on the freebsd-geom@
list. Provide output of gmirror list.
I'll try that list...
So, your steps were:
1. ad4, ad6, ad8 and ad10 in a 4-way mirror
2. ad4 fails. At this point did you do a gmirror list? I.e. did
gmirror detect it failing?
This only happens with ad4. If ad6 for example goes offline in the same way,
when it is reinserted
it does not become the dominant drive and resync its data with the other
drives. Rather its data
is overwritten with the data from the 3 member mirror, as you'd expect.
looks like very
By kicked out you mean overwritten?
You should definitely look at gmirror list before and after.
Sorry for the confusion. By kicked out, what I meant was as gmirror started
up it took ad4 as the principal member, saw that it was previously part of a
mirror with three other drives and tried
I wanted to use the kern.disks sysctl variable but it doesn't seem to work the
way I'd expect. When I first inspected this variable it showed the four hard
drives I would expect:
ad4 ad6 ad8 ad10
Then I inserted a USB stick and checked kern.disks again, and this time the new
USB drive was
We've found that FreeBSD 7.0's support for USB disks is pretty unstable. We
have a process that creates a bootable FreeBSD 7.0 image on a USB disk and this
requires writing a fairly large amount of data in one shot to the USB drive.
We've found that there is probably less than a 50% chance of
I've created a GEOM mirrored file system and everything seems to be working,
but I get the warning
WARNING: Expected rawoffset 0, found 63
when the mirror is being created. What is this referring to?
___
freebsd-questions@freebsd.org mailing list
Are you gmirror'ing the BSD slice?
Wrong:
/dev/ad0s1
/dev/ad2s1
Right:
/dev/ad0
/dev/ad2
That's what it sounds like to me.
I don't think that's the issue. I read many articles on how to mirror slices,
including the BSD slice, and in earlier tests I never saw this error.
I've created an autorun facility for USB drives using devd. I have the
following addition in devd.conf:
attach 10 {
match device-name umass0;
action /usr/local/bin/autorun /var/log/autorun.log 21 ;
};
This works perfectly except only stderr messages appear in the autorun.log
file; stdout
I do something like this. Here's the rules I have
in /usr/local/etc/devd.conf
...
attach 10 {
match device-name umass0;
action sleep 2; /root/bin/usbstick_attach /dev/console;
};
I've tried something similar and I'm having good success. I should be able
accomplish what I need with
A typical df command looks like this:
# df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/mirror/gm0a 4.8G 2.0G 2.4G 46% /
devfs 1.0K 1.0K 0B 100% /dev
linprocfs 4.0K 4.0K 0B 100% /proc
/dev/mirror/gm0d 3.9G 88K 3.6G 0% /tmp
/dev/mirror/gm0e 15G 79M 13G 1% /var
/dev/ad4s3e 116G
Line 417 of /usr/src/bin/df/df.c:
used = sfsp-f_blocks - sfsp-f_bfree;
I keep forgetting that I can go directly to the source to answer questions like
this. Thanks muchly; this is exactly what I need.
___
freebsd-questions@freebsd.org mailing
I want to have a process running on my FreeBSD box that automatically detects
when a USB drive is inserted. What's the easiest way to accomplish this? I know
I could simply monitor /var/log/messages and look for the appropriate events to
appear, but is there a more elegant way?
My question to you would be: What exactly do you mean by
automatically detect? The drive *is* automatically detected.
Should it be mounted afterwards?
Yeah, I guess my wording was a little vague. I know that the system
automatically detects when a USB drive is inserted, and creates the
This looks like it will do exactly what I need. Thanks for the pointer!
- Original Message -
From: Wojciech Puchar woj...@wojtek.tensor.gdynia.pl
To: Peter Steele pste...@maxiscale.com
Cc: questi...@freebsd.org
Sent: Wednesday, March 11, 2009 8:08:20 AM GMT -08:00 US/Canada Pacific
Last week I submitted a patch to get this system and subsystem
documented in the manual page of devd.conf. It should be in CURRENT now,
and will be MFC'd to STABLE in a week or so.
This looks like exactly what we need, except we're using 7.0, and are too close
to releasing 1.0 of our
It's missing the call to devctl_notify in the devfs handling. This was
added to RELENG_7 on the 28th of May 2008. You'll need at least
rev. 1.208.2.4 of /usr/src/sys/kern/kern_conf.c. See:
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/kern_conf.c?f=uonly_with_tag=RELENG_7logsort=date
The scripts are a bit primitive and get totally confused if I insert
more than one USB storage device at a time so would need some
refinement for general use but work OK for me as the only user on this
PC.
Thanks, I'll give this a try and see how it works. We have a very simple
requirement
Then try another solution: a cron job, as explained in another msg.
Yeah, that's probably the simplest approach. This was my first thought, but I
figured there'd be a more elegant way of doing it if I could tie into the drive
insert event
___
I have a process that automates the creation of a master FreeBSD image that we
clone onto mulitple machines. In the latest version of this image I am seeing
the warnings:
warning: KLD '/boot/kernel/linprocfs.ko' is newer than the linker.hints file
warning: KLD '/boot/kernel/linux.ko' is newer
Probably you installed that files _after_ linker.hints is generated,
just make sure that they are still compatible with /boot/kernel/kernel
Perhaps its a matter of the process we're using. I first install the GENERIC
kernel into the image I am creating:
export DESTDIR=${IMAGE_DIR}
export
I have a process with creates bootable USB disks with FreeBSD 7.0. The creation
of the USB disks is pretty straightforward. We have a master OS image saved as
a tarball, and when we want to create a new USB disk, we simply create a single
bootable UFS partition on the target USB drive and then
Shot in the dark but are they by any chance U3 devices?
http://en.wikipedia.org/wiki/U3
There is no indication of that. They mount fine and can be formatted as UFS and
have files copied to them. They are just basic 4GB USB flash drives, on sale at
our local Frys. HP brand (but I don't know
from what I understand it's widely known there is not a standard for
implementing USB bios boot.
I can take a flash drive make it bootable with grub4dos and my board will not
see it.
Take that same drive implement normal grub or syslinux and my board will now
boot that flash drive. Take
How do I install the standard boot manager on a disk using a command line tool?
I believe
boot0cfg -B /dev/adN
installs the FreeBSD boot manager, but I want the standard boot manager that
matches the option in sysinstall.
___
I've created a USB boot disk that is used to clone itself onto the systems hard
drives, setting up mirrored file systems in the process. The main difficulty
I'm having is reimaging a system with an existing OS whose drives are already
configured in a mirror. I want of course to destroy the
I first wondered why none of my commands in /etc/profile and
~/.profile got executed. Finally, I modified
/usr/src/bin/sh/main.c to trace what files are read, recompiled
the sh command and: the only file that is executed is ~/.shrc.
I just cannot believe that FreeBSD has such a severe bug.
Can I run sysinstall on a live system, booted say from ad0 and use it to
install a new OS onto a second drive, say ad1? I'm trying to do something like
this:
sysinstall configFile=install.cfg loadConfig
where I have the target drive identified in the sysinstall script, but it
doesn't seem
Yes for sure. You can partition secondary drives on a running system as long
as the drive isn't mounted and your kern.securelevel 2.
It's -1, so I assume that's okay.
You will need to define doesn't seem to like what I'm trying to do to get a
more constructive answer.
Yeah, that wasn't
That's my problem in a nutshell ultimately--how do I tell sysinstall where my
target root is? It impacts the whole
session, including packageAdd commands.
I did a bit of snooping around the distribution and I see that each directory
has a simple install script to install base, the kernel,
I solved the issue in my case. When I first ran the script I didn't notice that
it created versions of several system config files, including loader.conf and
rc.conf. I modified the script to make versions that matched my requirements
and the keyboard hang problem went away.
- Original
The script runs fine, but the resulting USB drive won't boot. It hangs on
Feb 25 19:27:50 kernel: atkbdc0: Keyboard controller (i8042) port 0x60,0x64
irq 1 on acpi0
every time. I tried different systems as well. There is no error, it just
hangs. Any idea what this is about? I did a web
No, meaning, if a system is unresponsive for 300 seconds, action will be
taken. watchdogd will not prevent proper reboots, panics or power failures.
Bad wording on my part. What you said is what I meant, and I assume the default
action is to reboot the system?
Panic, or overheating. Check
Panic, or overheating. Check the dumpdev/dumpdir variables in rc.conf(5).
BTW, what's the difference between setting kern.corefile in /etc/sysctl and
these dumpdev/dumpdir variables?
___
freebsd-questions@freebsd.org mailing list
If -e cmd is not specified, the daemon will
perform a trivial file system check instead.
So -e has to be provided for the system to reboot? That doesn't seem to jive
with our experience. When we first enabled the watchdog, we just went with the
defaults--no -e command. The default for the
Which watchdog are you using?
We are using the default FreeBSD 7.0 watchdog. We've added the line
watchdogd_enable=yes
to rc.conf to enable it and have modified /etc/rc.d/watchdogd to pass -t 300
to the daemon instead of the default 16.
___
We have our systems configured with the watchdog enabled, with
/etc/rc.d/watchdogd defined as
. /etc/rc.subr
name=watchdogd
rcvar=`set_rcvar`
command=/usr/sbin/${name}
command_args=-s 10 -t 300
pidfile=/var/run/${name}.pid
load_rc_config $name
run_rc_command $1
We assumed this would
We want to develop a system imaging process where all we have to do is insert a
USB thumb drive into a system and reboot it, and some time later the system
would be loaded up with whatever FreeBSD software the particular thumb drive
being used is configured. We'd have different thumb drives for
We have systems that upon initial configuration have no IP addresses
assigned. Their rc.conf entries look like this:
ifconfig_nfe0=UP
ifconfig_nfe1=UP
cloned_interfaces=lagg0
ifconfig_lagg0=laggproto failover laggport nfe0 laggport nfe1
defaultrouter=0.0.0.0
The user later runs a tool
We have systems setup using geom based mirroring where the drives are
partitioned into three slices, one for the OS, one for the swap
partition, and one for our application data. We have four hot-swappable
SATA drives per system. At present we only have the OS slice mirrored
with geom, and our own
If you don't mirror swap space, and a drive goes out, you're almost
certain to experience a kernel panic and not just application failures
in userland. Unless you have an urgent need for lots of swap space
available, it's much better from the standpoint of system reliability
to mirror
Did you enable SO_BROADCAST and IP_ONESBCAST on the socket? I remember
needing
this on FreeBSD but not on Linux.
Yes we did, but...
I know UDP broadcasting works fine, but is
somewhat more involved:
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = inet_addr(130.89.191.255);
addr.sin_port =
why 255.255.255.255 not your net broadcast address?
Because the systems we are using do not have IPs assigned and you to
know your subnet before you can use subnet broadcasting. We're
developing our own DHCP-like service to distribute IPs to all of the
systems, and we need limited broadcast to
Our efforts so far indicate the answer is no, which baffles us. We want
to send a limited broadcast to 255.255.255.255 but the message never
arrives. The same code works fine under Linux. Is there a trick for
doing this kind of thing under FreeBSD?
What you're trying to do with sending to the all-ones broadcast
address is known as sending a link-local packet. On some systems,
sending a UDP packet to 255.255.255.255 will actually cause a packet
with that destination to be generated from all network interfaces
which are UP. That
I've already looked at the ISC DHCP source code. They use raw sockets
to
send their broadcasts, which seems to us to be a convoluted way of
sending a simple broadcast. I've seen examples of DHCP client/server
code written in Java using standard UDP. Unfortunately, our own system
is already
101 - 176 of 176 matches
Mail list logo