[ovs-dev] [PATCH 2/2] ovs-bugtool: Add ovs-ctl.log to debug bundle.

Ben Pfaff blp at nicira.com
Thu Mar 14 17:40:10 UTC 2013


On Thu, Mar 14, 2013 at 10:31:29AM -0700, Gurucharan Shetty wrote:
> On Thu, Mar 14, 2013 at 10:28 AM, Ben Pfaff <blp at nicira.com> wrote:
> > On Wed, Mar 13, 2013 at 03:38:02PM -0700, Gurucharan Shetty wrote:
> >> ovs-ctl.log will include the o/p of ovs-ctl when
> >> run from rhel, debian and xenserver startup scripts.
> >>
> >> Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
> >
> > Looks good, thanks.
> >
> > It now occurs to me that we won't have any timestamps in ovs-ctl.log.
> > I wonder whether we should do something like "date -u >>
> > $logdir/ovs-ctl.log" in the ovs_ctl function.
> Yes. I thought about it. Then felt that someone may not do multiple restarts
> in a single day (logrotation kicks after that). But I think it makes
> sense to add it.
> If ovs_ctl function becomes part of ovs-lib, we may end up with 2
> dates for a function like "restart". Once while we start, and once
> while we stop. I guess, that is fine.

I guess so.

We could be even more thorough, something like this:

ovs_ctl () {
    cat >>$logdir/ovs-ctl.log <<EOF

`date -u`: ovs-ctl "$@":
EOF
    ....
}

Then, we would get more useful information in addition to timestamps.



More information about the dev mailing list