On 04/08/07, Peter Jeremy <[EMAIL PROTECTED]> wrote:
> On 2007-Aug-04 08:10:13 +0100, mal content <[EMAIL PROTECTED]> wrote:
> > if (sysctlbyname("kern.cp_time", cp_time, &len, 0, 0) < 0) return 0;
>
> kern.cp_time returns a set of counters that are
Hello.
I'm trying to write a function sys_cpu_percent() that
returns the current cpu usage as a percentage. I currently
have this:
double sys_cpu_percent()
{
long cp_time[CPUSTATES];
double used;
double total;
size_t len = sizeof(cp_time);
if (sysctlbyname("kern.cp_time", cp_time, &len
What does this program do?
#include
int main(void)
{
printf("%u\n", 0x2a);
return 0;
}
Docs are more important than drivers. Please ask for
docs.
MC
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hac
Hello.
This is related to my earlier email, which I now believe
to be unanswerable (so it's probably worth ignoring).
Why do FIFOs work asymmetrically with regards to opening
for reading or writing?
int rfd;
int wfd;
if (mkfifo("fifo_r", 0600) == -1) die();
rfd = open("fifo_r", O_RDONLY |
Hello.
The wording of the question in the subject is terrible,
I know. What I'm trying to do is write a program that
creates two named pipes in the filesystem. Logging
date appears on one, to be read by any external program
and commands are read by the program from the other.
If data is written
On 27/05/07, Bjoern A. Zeeb <[EMAIL PROTECTED]> wrote:
Having a generic, more secure and reliable (local) logging mechnism
should be discussed in at least another thread. You may as well think
of taking this idea to IETF as RFC 3164 lives there as a Memo these
days and it might be a general enou
Hello.
When using this libmap.conf:
libpthread.so.2 libthr.so.2
libpthread.so libthr.so
libc_r.so.6 libthr.so.2
libc_r.so libthr.so
...nearly every program receives SIGFPE when calling various
functions, when running under gdb. strtol() is one example
Hello.
Is it possible to give a thread realtime priority, as opposed to an
entire process?
thanks,
MC
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTEC
Hi.
So, if I want to link to the shared library /usr/local/libxyz.so, I
simply add '-lxyz'
to my program link commands. But what if I want to link to the equivalent
static library?
The GCC manual says:
-static
On systems that support dynamic linking, this prevents linking
On 08/09/06, Kris Kennaway <[EMAIL PROTECTED]> wrote:
I don't see the libopenal file you claim:
> ls -l /usr/local/lib/libopenal*
-rw-r--r-- 1 root wheel 369960 Aug 31 14:14 /usr/local/lib/libopenal.a
-rwxr-xr-x 1 root wheel 831 Aug 31 14:14 /usr/local/lib/libopenal.la
lrwxr-xr-x 1 ro
On 08/09/06, Kris Kennaway <[EMAIL PROTECTED]> wrote:
On Fri, Sep 08, 2006 at 05:16:43PM +0100, mal content wrote:
> Some ports do seem to use this format:
>
> $ ls /usr/local/lib | egrep '^lib.*\.so\..*\.'
> libopenal.so.0.0.8
> libportaudio.so.0.0.18
> $ ls
On 06/09/06, Kris Kennaway <[EMAIL PROTECTED]> wrote:
On Wed, Sep 06, 2006 at 07:18:18PM +, Edward B. DREGER wrote:
> Greetings all,
>
>
> I'd been going nuts trying to determine why I couldn't link against
> "libdb-4.4.so" and a few other libraries. The ones in question didn't
> show up via
On 29/08/06, Matthew Hagerty <[EMAIL PROTECTED]> wrote:
Greetings,
I have a hard drive that every now and then makes a sound like the head
is moving from one extreme to the other, then parking. It is hard to
explain, kind of a towk-kok-click with a metallic ring to it. If you
have heard a driv
On 21/08/06, Peter Jeremy <[EMAIL PROTECTED]> wrote:
On Mon, 2006-Aug-21 16:05:33 +0100, mal content wrote:
>I have another favour to ask: Is there a function that can
>take two absolute paths and generate a relative path, from
>source to destination?
I don't think there
Thanks to all who helped point me towards realpath().
I have another favour to ask: Is there a function that can
take two absolute paths and generate a relative path, from
source to destination?
/usr/bin/false /bin
Becomes:
../../bin
/bin /usr/bin/false
Becomes:
../usr/bin/false
thanks,
M
On 19/08/06, Joerg Sonnenberger <[EMAIL PROTECTED]> wrote:
On Sat, Aug 19, 2006 at 01:27:49PM +0100, mal content wrote:
> Is there any code in the tree that does general path transformation
> or 'optimisation'?
>
> For example, this path corresponds to the current w
Hello.
Is there any code in the tree that does general path transformation
or 'optimisation'?
For example, this path corresponds to the current working directory:
"dir1/dir2/dir3/../../../"
So I'd like to be able to pass that to a function and get the optimised
result of:
"."
And so on for
On 12/08/06, Max Laier <[EMAIL PROTECTED]> wrote:
This is because the packets never make it to the IP-Layer (where our
packet filters normally hook into). You can try to use if_bridge(4) to
bridge tap0 and fxp0. if_bridge(4) offers extensive means of packet
filtering described in the man page
Hello, this is a simplified re-phrasing of a question posted to
[EMAIL PROTECTED] It didn't get any answers over there because I
think people took one look at it and switched off. A cut down
version follows...
How does one do packet filtering on tap interfaces? I'm using
qemu and I'm going to be
I believe this question was asked before (it may have even been
asked by me, but I couldn't find record of it):
What happened to the effort to port systrace to FreeBSD?
The last known information I could find was this:
http://techie.devnull.cz/systrace/
Which shows FreeBSD 5.1, at best.
I tho
On 12/07/06, Dag-Erling Smørgrav <[EMAIL PROTECTED]> wrote:
"mal content" <[EMAIL PROTECTED]> writes:
> Can anybody tell me where /boot/boot is built in the source
> tree?
src/sys/boot
DES
--
Dag-Erling Smørgrav - [EMAIL PROTECTED]
Argh! I must have looke
Can anybody tell me where /boot/boot is built in the source
tree?
I'm trying to put together a customised bootable image for
qemu but can't find this missing piece.
MC
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listin
On 05/07/06, Daan Vreeken [PA4DAN] <[EMAIL PROTECTED]> wrote:
On Wednesday 05 July 2006 03:15, mal content wrote:
> On 03/07/06, Peter Jeremy <[EMAIL PROTECTED]> wrote:
> > For dynamic executables, you could LD_PRELOAD a .so that replaces
> > all the socket-rela
On 03/07/06, Peter Jeremy <[EMAIL PROTECTED]> wrote:
For dynamic executables, you could LD_PRELOAD a .so that replaces
all the socket-related syscalls.
Excellent suggestion! Ok, I've created a basic .so file with the following
code, but I've basically got stuck because I don't know how the orig
Was it my imagination or did I see a function in libc that
allowed a process to prevent further network access? I'm
pretty sure that I read the manual page for it and now I can't
find it.
I was looking for a way to write a small wrapper program
that disables network access and then exec()'s a giv
Hello.
Is it possible to grant real-time privileges to ordinary
users (not root) under FreeBSD? I'm doing some audio
work and I'd like to give real time privileges to my user id.
MC
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/
On 06/06/06, Pieter de Goeje <[EMAIL PROTECTED]> wrote:
Hi MC,
On Sunday 04 June 2006 20:48, mal content wrote:
> Is this expected behaviour (I'm using the mkdir utility
> for the example, but the problem occurs using the system
> call directly):
>
> # mkdir .
> mk
Is this expected behaviour (I'm using the mkdir utility
for the example, but the problem occurs using the system
call directly):
# mkdir .
mkdir: .: File exists
# mkdir ..
mkdir: ..: File exists
Now, the unusual one:
# mkdir /
mkdir: /: Is a directory
Shouldn't it say 'file exists'?
The mkdir
28 matches
Mail list logo