Fun log file control

Fun log file control

Post by Scott M. Hampton aka Woulf » Fri, 11 Jun 1993 14:46:35



I am a relative newcomer to the *joy* of being a UNIX sysadmin. It has been
my sincere pleasure to start with Solaris 2.1.....

My question is quite simple (I hope): I am attempting to figure out where
all (and why all) the log files live in order to automate the cleanup
proceedure. If anyone has a good script, I would love a sample. More
important, however, is my concern about ONE file. In /var/nis is a file
called machine_name.log, which is a bit large. ls reports it's size as
12582913, which strikes me as damn big. The system runs fine if I delete it,
and it is created automatically at boot. I can find no references to it in
the man pages or AnswerBook. Any clues?

--

                 <<<>>> choose either of <<<>>>


 
 
 

Fun log file control

Post by Richard Elli » Sat, 12 Jun 1993 02:43:02



Quote:>My question is quite simple (I hope): I am attempting to figure out where
>all (and why all) the log files live in order to automate the cleanup
>proceedure. If anyone has a good script, I would love a sample. More
>important, however, is my concern about ONE file. In /var/nis is a file
>called machine_name.log, which is a bit large. ls reports it's size as
>12582913, which strikes me as damn big. The system runs fine if I delete it,
>and it is created automatically at boot. I can find no references to it in
>the man pages or AnswerBook. Any clues?

In Solaris 2, (almost?) all log files are located in /var.  It is wise to
install /var in a partition with plenty of room.  By default, suninstall will
keep /var in the / partition, but you can also put it in another partition.
For NIS+ servers, I recommend having 80 - 100 Mb of space in /var to hold
the /var/nis database.  You want plenty of room there because NIS+ may not
gracefully handle running out of room.

Now then, you are mistaken about what ls is telling you.  The length of the
machine_name.log file is 12582913.  The size is normally somewhat smaller.
Here's the output of "ls -ls xxx.log" for one of my NIS+ servers:

  6960 -rw-------   1 root     other    12582925 Jun 10 01:24 xxx.log
  ^^^^                                  ^^^^^^^^
  size                                   length

Whatever you do, don't touch that file!  You will be very sad if you delete
the NIS+ log files since you will probably have to reload NIS+ to get things
to work again.

Lastly, if NIS+ does get hosed, it can generate a very sizable core file.
This core image will include the entire database that NIS+ has in memory.
It also likes to dump this core in /var/nis which makes the space problems
worse.  Since I don't have source code for NIS+ and therefore can't do much
with a core dump, I make sure that rpc.nisd doesn't dump core.  I changed
/etc/init.d/rpc to set the core size limit to 0 for rpc.nisd as follows:
        (ulimit -c 0 ; /usr/sbin/rpc.nisd -r $EMULYP )

So far, no mombo cores :-)

---
 Richard Elling, Manager of Network Support, Engineering Administration

 Show me a psychoceramic and I'll show you a crackpot.

 
 
 

1. Fun fun fun! :)

I upgraded xf 4.0 to xf 4.0.1 on my PPC running YDL 1.2 (redhat).  I
wanted the latest and greatest video driver... which seems to be very
nice, so far!!

Well, for anyone about to do this, be warned that the XF86Config file
has incorrect keyboard mappings for G4s, anyway.  You can copy the old
settings from the old config file, and you have to do some tweaking
since the config file format has changed, but I think it will be obvious
to you when you compare the two.

Good luck to anyone else out there who is getting ready to upgrade.  I
also upgraded gnome to helix-gnome last night...  that too was an
adventure.  But thanks to the many helpful people who read this
newsgroup, I was able to get through it!   :)

Thanks!

Mike J.

2. XFree86

3. fun, fun fun

4. get the most recent file based on name and use it

5. KIllustrator: fun, fun, fun.

6. 2.5.68: NFS hang on write/close

7. Apache | log files | file-type control

8. Has anyone seen this???RPM/SETUP errors

9. I want somthing to control and analysis logs files

10. How can I control the rotating schedule of specific log files?

11. Control size of Apache log files

12. How can I split a log file into several log files?

13. wierd stuffs in proxy log file and back end server log file