[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] tools/xentop: add option to display dom0 first
On Tue, Feb 06, 2024 at 03:38:05PM +0100, zithro wrote: > On 05 Feb 2024 18:27, Anthony PERARD wrote: > > On Wed, Jan 31, 2024 at 06:51:34PM +0100, Cyril Rébert wrote: > > > Add a command line option to xentop to be able to display dom0 first, on > > > top of the list. > > > This is unconditional, so sorting domains with the S option will also > > > ignore dom0. > > > > > > Signed-off-by: Cyril Rébert (zithro) <slack@xxxxxxxxx> > > Your patch looks like a good idea > > Thanks, I also have a "display dom id column" in the pipes, almost ready to > send, but I found kind of a bug doing this (field_id/fields offsets off by > one). > Are there "most wanted functionnalities" concerning xentop, while I'm at it > ? There's a TODO in xentop's folder. That TODO file is 18 year old, and never been touch since. I don't know how relevant it is. As for wanted features, I'm not aware of such list. > Things I'd like to add, if possible, is domain management (pause/unpause, > maybe shutdown/destroy), columns hiding and domains hiding. I'm slightly worried about adding domain management, what if someone hit the wrong key and kill a domain when they just wanted to do something else, but I guess we can make domain management work more or less safely. In any case, any feature is welcome. > > but xentop segv without '-z' now, when there are guest running. > > I failed at the strict minimum here, should have tested ... Sorry for > wasting your time ! No worries, and your patch was reviewed so you didn't failed to the strict minimum ;-). > Bug spotted ("sort_start" incorrectly initialized), will post a v2. > > > Revelant part of a backtrace: > > #0 xenstat_domain_name (domain=0x121) at xenstat.c:344 > > 344 return domain->name; > > #6 0x00006344dd283651 in top () at xentop.c:1209 > > i = 2 > > num_domains = 2 > > sort_start = 1 > > sort_count = <optimized out> > > dom0_index = <optimized out> > > 1209 qsort((domains+sort_start), (num_domains-sort_count), > > sizeof(xenstat_domain *), > > 1210 (int(*)(const void *, const void > > *))compare_domains); > > What soft did you use to get that output ? A debugger ? > (It's a real question, I'm a noob). I've used `gdb`, the GNU Debugger. There's plenty of tutorial on the internet on the few commands that are useful to get started. And you can run your program with gdb or run it on a coredump. What I pasted, is a mixture of running the command `bt full`, and `list` and `up`/`down` to get to the function I wanted to print a bit of the source code. Cheers, -- Anthony PERARD
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |