[syslog-ng]a weird configuration

syslog-ng@lists.balabit.hu syslog-ng@lists.balabit.hu
Wed, 04 May 2005 13:47:58 -0400


--==_Exmh_1115228877_4721P
Content-Type: text/plain; charset=us-ascii

On Wed, 04 May 2005 14:34:01 -0300, Julio Kriger said:
> Yes, exactly.
> 
> a) I'm using Linux Gentoo 2.6.11-rc6 (gentoo-sources if you know about
> gentoo)
> b) Any debug message, I've done some modifications and I'm testing them,
> I've added my own messages
> c) It will help understand why this modifcation I made don't work :)

OK.. then it's actually pretty easy, sort of, for a partial solution. ;)

Basically, at any given printk(),  you're either running on the current->
that got you there or you're not (and if you don't know, and can't figure out
how to tell, you shouldn't be playing in that code.  :)  So if you're in code
where current-> make sense(*), just do something like:

   printk(KERN_DEBUG "sctp: cur=%d(%s) this=%d that=%x\n",
	current->pid, current->exe, thing1, thing2);

and then filter in syslog-ng on the program name the %s outputs...

(*) There's places where current-> is defined, just not the process you thought
it was, at those places you can safely dereference current-> if you're willing
to put up with odd output values. net/sctp/* shouldn't hit any cases where
current-> is totally bogus - most of that code is in drivers/ and deals with
the interrupt and IRQ level code).

--==_Exmh_1115228877_4721P
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Exmh version 2.5 07/13/2001

iD8DBQFCeQrMcC3lWbTT17ARAgPXAKDTGRht/yuk13DV4vSg/Fj+zBwkaQCfS2l8
zygQA19NOss1UAIaU4F+/tY=
=u3ba
-----END PGP SIGNATURE-----

--==_Exmh_1115228877_4721P--