VectorLinux
April 23, 2014, 07:34:43 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: Flogging the syslog.n  (Read 1141 times)
Windozer
Vectorite
***
Posts: 386


Have Vector Linux, Will Travel.


« on: December 06, 2008, 12:41:21 pm »

Well, after doing a bit of searching and man reading, I'm more confused than before about the syslog stuff Huh

A little C code logging string and timestamp ends up in log files that don't make sense (to me).

The syslogs are numbered, e.g., syslog.1, syslog.2, etc. But the number doesn't seem to be run-level or syslog alert level --- or am I just not getting it? DOH!

1. What do the numbers refer to?
2. Is there a syslogd option, or some other command, to delete (or empty) the logs without 'rotating' them? 

(Sorry, I feel like this isn't something I should be asking about, but I've actually dug through several books and links to no avail  Embarrassed )

thanks,
Howard in FL
~~~~~~~~
Logged

483,617th Registered Linux Snoozer
bigpaws
Vectorian
****
Posts: 1834


« Reply #1 on: December 06, 2008, 01:25:37 pm »

You can move logs without rotating them by
sending the logs to /dev/null

Most commands are setup to do output to a screen or
a file

Example

dmesg outputs to your screen the results from a bootup.

If you changed the output to /dev/null then you sent it to
no where. Type dmesg > /dev/null

Interpretation:

By typing dmesg you are asking for an output which is
to the screen > = redirection of the output.

If dmesg was setup to output to a file then redirecting to
/dev/null will send the file to the bit bucket (nowhere).

What is it that you are trying to do? Perhaps a better
example would be possible.

Bigpaws
Logged
Windozer
Vectorite
***
Posts: 386


Have Vector Linux, Will Travel.


« Reply #2 on: December 07, 2008, 01:16:24 pm »

thanks Bigpaws,

hmm... I'll try your suggestions and hack this a bit more.

Do you know what the numbers on the file extensions below mean?  thanks again! - H

Code:
//var/log
vector> ls
...
debug
debug.1
debug.2
...
syslog
syslog.1
syslog.2
Logged

483,617th Registered Linux Snoozer
bigpaws
Vectorian
****
Posts: 1834


« Reply #3 on: December 07, 2008, 01:26:06 pm »

Those are the rotation of files.

debug after a certain size becomes
debug.1 and then goes to
debug.2 after that the file is deleted.

This keeps /var/log from filling up.

Bigpaws
Logged
Windozer
Vectorite
***
Posts: 386


Have Vector Linux, Will Travel.


« Reply #4 on: December 07, 2008, 01:59:02 pm »

Quote
Those are the rotation of files.

DOH !

See, I told you it was something simple!  And, just to show how a n00b can goof up something simple, I tried deleting the debug log as root...

Ouch... Guess I'm gonna upgrade my ext2 to ext3 so that I don't feed more inodes to lost+found - and have to reboot three times til my machine gets its brain back !

cheers to you, BigPaws!
- H
Logged

483,617th Registered Linux Snoozer
EyesOnly
Member
*
Posts: 78



« Reply #5 on: December 08, 2008, 05:47:49 pm »

LOL! And I really like your signature file WinDoze! Let's make sure we both pack a really huge basket betwix us both. I hope too that you're better at reading a roadmap than I am? rofl!

In all actuality though? I've been at this "Linux Craze" now for close to 4 years. It's been an exciting time in my life and I hope it has been equally-so for you? I'll tell you something that I've discovered in those 4 years: Linux is a lot like those Timex Watches. It can take a lickin' and keep on tickin'. Wink Unlike another system I worked on for nearly 20 years. (Though that serves its purpose equally-well and I have nothing against that one either.)

Again: I really enjoy that signature file mate!

Amicalement/Cheers!

Eyes-Only
"L'Peau-Rouge"
Logged

"We never know just how much a kind word, or a gesture, will lift the spirits of a friend, or person, in need and heal them." (jimmymac)
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!