# Metalog no longer logging to console

## oneandoneis2

I use metalog as my system logger, and I like to have it display logs on tty12. Which it always used to do, no problem.

It stopped working a while ago, I think due to portage upgrading it & replacing the config file. But I cannot get the blasted thing to work again.

This is what comes up when I restart metalog:

```
May 10 21:36:45 [metalog] Process [12281] died with signal [15]

May 10 21:36:45 [metalog] Child [12408] exited with return code 127.

May 10 21:36:45 [metalog] Forked command "/usr/sbin/consolelog.sh 12 "May 10 21:36:45" "metalog" "Process [12281] died with signal [15]

" [12408].

May 10 21:36:45 [metalog] Process [12282] died with signal [15]

May 10 21:36:45 [metalog] Child [12409] exited with return code 127.

May 10 21:36:45 [metalog] Forked command "/usr/sbin/consolelog.sh 12 "May 10 21:36:45" "metalog" "Process [12282] died with signal [15]

" [12409].
```

Can anyone tell me what all this actually means?

Thanks in advance!

----------

## adrenalin

problem solved? i think you should have a look at /etc/conf.d/metalog.

----------

## eltech

cant seem to fix this either  .. i thought to tty10 would fix it also as it was set to /dev/console.

any ideas?

thanks

----------

## adrenalin

 *eltech wrote:*   

> cant seem to fix this either  .. i thought to tty10 would fix it also as it was set to /dev/console.
> 
> any ideas?
> 
> thanks

 

can you post one of your 'Forked command' messages and your /etc/conf.d/metalog ?

----------

## eltech

 *adrenalin wrote:*   

>  *eltech wrote:*   cant seem to fix this either  .. i thought to tty10 would fix it also as it was set to /dev/console.
> 
> any ideas?
> 
> thanks 
> ...

 

sure ...

Thanks for the help ..

```

Jul 18 13:57:14 [metalog] Forked command "/usr/sbin/consolelog.sh "spamd[3702]:" "spamd" "cannot use vpopmail without -u_" [3956].

Jul 18 13:57:14 [metalog] Child [3956] exited successfully.

spamd[3702]: [spamd] checking message <49bf44f10607181052n7742ace2kd96350cc88d6f005@mail.gmail.com> for qmaild:0_

Jul 18 13:57:14 [metalog] Forked command "/usr/sbin/consolelog.sh "spamd[3702]:" "spamd" "checking message <49bf44f10607181052n7742ace2kd96350cc88d6

f005@mail.gmail.com> for qmaild:0_" [3957].

Jul 18 13:57:14 [metalog] Child [3957] exited successfully.

spamd[3702]: [spamd] clean message (0.5/3.5) for qmaild:0 in 0.2 seconds, 2787 bytes._

Jul 18 13:57:14 [metalog] Forked command "/usr/sbin/consolelog.sh "spamd[3702]:" "spamd" "clean message (0.5/3.5) for qmaild:0 in 0.2 seconds, 2787 

bytes._" [3958].

 
```

----------

## adrenalin

your log messages indicate that the 'consolelog.sh' commands exited successfully while they did not for the original poster. However, the 'forked command' lines should look like 'Forked command "/usr/sbin/consolelog.sh <terminal> "<date>" "<facility>" "<logmessage>". Can you post the contents of your /etc/conf.d/metalog file too?

----------

## eltech

 *adrenalin wrote:*   

> your log messages indicate that the 'consolelog.sh' commands exited successfully while they did not for the original poster. However, the 'forked command' lines should look like 'Forked command "/usr/sbin/consolelog.sh <terminal> "<date>" "<facility>" "<logmessage>". Can you post the contents of your /etc/conf.d/metalog file too?

 Aorry, been busy .. i appreciate your help ...

```

# /etc/conf.d/metalog

# $Header: /var/cvsroot/gentoo-x86/app-admin/metalog/files/metalog.confd,v 1.7 2006/02/08 01:04:02 vapier Exp $

# Some useful options:

#  -a   Log with buffering

#  -s   Log without buffering

# See `metalog --help` for more

METALOG_OPTS="-a"

# Options used by /usr/sbin/consolelog.sh

# Space delimited list of devices to write "console" messages to

#CONSOLE="/dev/console /dev/tty10"

CONSOLE="/dev/tty10"

# Format of logging (make sure you use single quotes)

FORMAT='$1 [$2] $3'

```

----------

## adrenalin

Looks fine. And actually i have been wrong about the format of the 'forked command' lines - they should look like 

```
[metalog] Forked command "/usr/sbin/consolelog.sh "<date>" "<facility>" "<logmessage>" <pid of the forked command>'
```

. Yours look rather like 

```
[metalog] Forked command "/usr/sbin/consolelog.sh "<programm>[<pid>]" "<facility>" "<logmessage>" <pid of the forked command>
```

, which indicates either a modified consolelog.sh script(post it?) or a modification of the metalog sources/binary(i wont go into this).

After rereading your original post and the posted log lines im also not quite sure whether you actually do see them on tty10 and are just annoyed by the clutter (I was and looked into the metalog.conf manpage especially the part about 'neg_regex'). If you dont see anything on tty10 - does

```
# echo 'this should appear on tty10' >/dev/tty10
```

 work?

----------

## eltech

 *adrenalin wrote:*   

> does
> 
> ```
> # echo 'this should appear on tty10' >/dev/tty10
> ```
> ...

 

Doesnt look so ..

```
pcns leonardb # echo 'this should appear on tty10' >/dev/tty10

pcns leonardb # 

```

----------

## adrenalin

```
pcns leonardb # echo 'this should appear on tty10' >/dev/tty10

pcns leonardb # 

```

Did you run this command on tty10? If you think you did, was it really tty10? (The 'tty' command should tell you) And you do know that you can switch terminals with Ctrl+Alt+anyfunctionkey?

----------

## eltech

 *adrenalin wrote:*   

> 
> 
> ```
> pcns leonardb # echo 'this should appear on tty10' >/dev/tty10
> 
> ...

 Hmmm. how can i change to tty10? when i type tty i get

```

/dev/pty/s1

```

----------

## adrenalin

Ctrl+Alt+F1 will switch to tty1, Ctrl+Alt+F2 will switch to tty2, ..., Ctrl+Alt+F10 will switch to tty10,  etc. '/dev/pty/s1' indicates that you are using 'pseudo terminals'. Not sure what the 's' means (maybe 'serial') and whether this is related to your problem. Not knowing how to switch to tty10 however is for sure related  :Wink: 

----------

