All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: moftah moftah <mofta7y@gmail.com>
Cc: xen-devel@lists.xen.org
Subject: Re: xen-ringwatch issues
Date: Fri, 9 Jan 2015 10:10:14 +0000	[thread overview]
Message-ID: <1420798214.21186.10.camel@citrix.com> (raw)
In-Reply-To: <CAPFC4RyC-XD8wdEqJ+6oakSQzKEoP9WTEp9anCkuhDkKJfbtSw@mail.gmail.com>

On Thu, 2015-01-08 at 14:07 -0500, moftah moftah wrote:
> Hi All,
> We are using Xenserver 6.2

FYI xenserver is developed as a separate project over at
www.xenserver.org, so in general you should be reporting
issue/requesting help over on their forums and lists etc.

However, since xen-ringwatch is shipped by upstream Xen we can at least
try and help with that bit here.

[...]
> so after searching around we changed the file xen-ringwatch in order
> to see the real issue the changes are

Those look sensible, please could you send with a changelog message and
a Signed-off-by as described in
http://wiki.xen.org/wiki/Submitting_Xen_Patches . The S-o-b in
particular is required in order to be able to accept a code
contribution.

> --- /usr/sbin/xen-ringwatch     2013-07-22 13:52:19.000000000 +0200
> +++ /usr/sbin/xen-ringwatch     2013-07-22 13:52:30.000000000 +0200
> @@ -238,7 +238,7 @@
>              match = cls._pattern.search(line)
>              if not match:
>                  raise Exception, "Malformed %s input: %s" % \
> -                    (cls.__name__, repr(s))
> +                    (cls.__name__, repr(line))
>  
>              i = iter(match.groups())
>              for k in i:
> 
> now the issue we see is like this
> Exception: Malformed Req input: 'req prod 3412900880 cons -882066416 event 3412900881'

I bet the negative number is confusing things (ah, which you also said
further down). 

Really the kernel ought to be printing these as unsigned (for which
you'll need to speak to the xenserver.org folks, I think)

But the python code could also deal with them more gracefully when it
sees them. You'd need to start by allowing the regex used for the match
to accept an optional leading "-" on the numbers.

You probably also want to cast the result to the unsigned value during
the subsequent parsing, my Python-fu isn't sufficient to know off hand
how one would do that.

Ian.

  reply	other threads:[~2015-01-09 10:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-08 19:07 xen-ringwatch issues moftah moftah
2015-01-09 10:10 ` Ian Campbell [this message]
2015-01-09 22:00   ` moftah moftah
2015-01-12  9:49     ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1420798214.21186.10.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=mofta7y@gmail.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.