Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
* vdump of root ..et al
@ 2000-02-11  5:00 HuBrIs
  2000-02-12  5:00 ` Jesper Frank Nemholt
  0 siblings, 1 reply; 3+ messages in thread
From: HuBrIs @ 2000-02-11  5:00 UTC (permalink / raw)



I'm running Digital Unix 4.0f on 2 Alpha 4000s and 1 GS140.
I was wondering where I stand as far as the following tasks:
what do you do?...

1) rebooting: I hard-reboot just about every Sunday, just to clean out the
cobwebs.

2) vdump root: once a month I boot single user mode and vdump / /var and
/usr to tape.
                      I always wondered if my method was leaving critical
files open:

                      console>>> b -fl s
                      >ksh
                      > set -o emacs
                      > bcheckrc
                      > vdump -0 -f  /dev/nrmt0h /; \
                      > vdump -0 -f  /dev/nrmt0h /var; \
                      > vdump -0 -f  /dev/rmt0h /usr;

3) resetting binary errlog:    About once a month I:
                       >cd /var/adm
                       > mv binary.errlog old_binary.errlog
                       > touch binary.errlog

                      I know there's a better procedure, I'm afraid of
stopping the log daemon.
                      Does anyone know how to force a trivial message to go
to this daemon to test the log file?

4) bonus question: I need to get "yesterday's" date for ksh scripts.... any
ideas?
    I thought of having a cron job that would just write today's dat to a
log file at  one second before midnight,
    then you can read from that....


thanks and happy computing

PFH





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: vdump of root ..et al
  2000-02-11  5:00 vdump of root ..et al HuBrIs
@ 2000-02-12  5:00 ` Jesper Frank Nemholt
  2000-02-14  5:00   ` John Sheldrake
  0 siblings, 1 reply; 3+ messages in thread
From: Jesper Frank Nemholt @ 2000-02-12  5:00 UTC (permalink / raw)


HuBrIs wrote:
> 
[clip]
> 3) resetting binary errlog:    About once a month I:
>                        >cd /var/adm
>                        > mv binary.errlog old_binary.errlog
>                        > touch binary.errlog
> 
>                       I know there's a better procedure, I'm afraid of
> stopping the log daemon.
>                       Does anyone know how to force a trivial message to go
> to this daemon to test the log file?

Instead of touching a new binary.errlog, do a kill -HUP on the binlogd
process ID. Then it'll create a new file itself.
To log a entry in the file do a :

logger -b "This is a test"

This will create a entry in the binary.errlog. If you do a uerf or dia
afterwords you should be able to see it.

> 
> 4) bonus question: I need to get "yesterday's" date for ksh scripts.... any
> ideas?

date --date '1 day ago'

or

date --date '-24 hours'

or

date --date '-1 day'


I don't remember using it on Digital Unix, but it works on Linux.


l8r/Jspr



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: vdump of root ..et al
  2000-02-12  5:00 ` Jesper Frank Nemholt
@ 2000-02-14  5:00   ` John Sheldrake
  0 siblings, 0 replies; 3+ messages in thread
From: John Sheldrake @ 2000-02-14  5:00 UTC (permalink / raw)


>> 4) bonus question: I need to get "yesterday's" date for ksh scripts....
any
>> ideas?
>
>date --date '1 day ago'
>
>or
>
>date --date '-24 hours'
>
>or
>
>date --date '-1 day'
>
>
>I don't remember using it on Digital Unix, but it works on Linux.
>
>
>l8r/Jspr

doesn't seem to work on DU but you could run a script like this

#!/bin/sh
TZ=GMT24
date


substitute GMT24 for whatever your TZ is normally and add 24hrs to it





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-02-14  5:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-02-11  5:00 vdump of root ..et al HuBrIs
2000-02-12  5:00 ` Jesper Frank Nemholt
2000-02-14  5:00   ` John Sheldrake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox