BUG: Advanced search in Process monitor doesn't work at all

interfasys

Verified User
Joined
Oct 31, 2003
Messages
1,821
Location
Switzerland
I get no result when I look for processes owned by a user.
If I use "root" in the query, I get some processes, but not all of them.
Looking for a PID returns nothing.

Seems completely broken to me.
 
Hello,

I believe this bug propogates to all tables, in all areas.
It's more a sorting design flaw in that all pages are still shown, even though the sorted data might be fewer pages. The data is only filtered as the table is generated, instead of before the table is generated. As a result, the total number of values is still the pre-filtered number, so you get strange sorted results.


For workarounds, usually clicking on "page 2", etc.. will show the data (which I agree, is not a desired behavior)

Also, try clicking the radio box to "Sort Selected Column in" in the column that you're searching with.

I'll look at redoing the table class's sorting to remove filtered results prior to generating the table, which should solve these weird quirks.

John
 
For workarounds, usually clicking on "page 2", etc.. will show the data (which I agree, is not a desired behavior)
There is no page 2 with the default behaviour (50 results)
Asking for 10 items per page gets me a page 2, bit I still get a flat table when clicking on it.
I just did another test and this time I did get a result on page 2, but it's very incomplete.
Doesn't seem to work with PIDs.

Also, try clicking the radio box to "Sort Selected Column in" in the column that you're searching with.
Didn't help, still nothing.

I'll look at redoing the table class's sorting to remove filtered results prior to generating the table, which should solve these weird quirks.

OK, maybe it's an issue with Chrome...but the source code didn't have more info than what was displayed.

Olivier
 
http://www.directadmin.com/features.php?id=1150

I think this bug is sorted. The "filter" (advanced search) was simply deleting items from the table if they didn't match. This was leaving "holes" in the array. This was fine, as the assembly of the table ignored the holes, but the total count didn't subtract the holes. A post-filter algorithm was added to remove the holes, shrinking the array back down to the smallest size, and updating the number of rows to the correct number. Now, a search only shows the correct number of pages for the items that are on them.

John
 
Well, I've just tried with 1.38 RC1 and I can't get the process monitor to show me anything.
I can see processes using ps aux, but DA doesn't return anything when using a pid, a user or a command.
When I try with root as the key, I get 7 processes vs 97 from the console.

I'm not authenticated on the Process Monitor page, but I shouldn't need to do it since I don't want to send signals.
 
I've just tried with 1.38 and it still doesn't work properly on FreeBSD.
Using "username equals reseller" returns absolutely nothing in DA, but
"ps aux | grep -c reseller" returns 18.
 
Hello,

I'm not getting the same result... I tested on FreeBSD 7, 64-bit.. but the OS really shouldn't make a difference.

Note that the "grep" command used is logically "contains" vs "equals", but DA doesn't use grep, it's all internal to the table class, and the actual table cell is checked.

I did a test with "USERNAME equals apache", and when running DA in debug mode (d200 | grep string), this is what I get:
Code:
GET string: comparison1=none&comparison2=equals&comparison3=none&comparison4=none&comparison5=none&comparison6=none&comparison7=none&comparison8=none&comparison9=none&comparison10=none&comparison11=none&comparison12=none&value1=&value2=apache&value3=&value4=&value5=&value6=&value7=&value8=&value9=&value10=&value11=&value12=&sort1dir=1&sort1=1&sort2dir=1&ipp=50
and generates the correct results (only httpd shows up).

Let me know what you get in that output when running DA in debug mode with the "|grep string" option on DA.
http://help.directadmin.com/item.php?id=293

John
 
Hello John,

I think I know what's happening.
To me a process monitor would give information about all running processes, but DA is using top for all its process operations.

The processes I'm looking for don't show up in the top 20 or so processes, so they will never show in my searches.

So by design, I will not get the results I'm looking for.

If you're happy with using "top" even for "Advanced search", then we can leave it at that, but maybe it would be a good idea to use "ps aux" for searches?
 
Hello,

On FreeBSD, DA runs this command to get the processes. See what it gives you:
Code:
/usr/bin/top -b -d 1
John
 
Hello John,

That's exactly it. There is not enough information in there to be able to find what I was looking for when I tried to use it. I was trying to not use the shell to quickly find processes owned by a user.
I think one thing that confused me is that we can choose to limit the listing to 500 items per page, but that command will never generate more than 20 entries.

Olivier
 
Thanks, I think that's what's missing. I added "inifinit" to the end (which seems like a typo to me, since "infinite" doesn't work) and it did show all processes, eg
Code:
/usr/bin/top -b -d 1 infinit
Let me know if that works for you, and I'll add it to the code. It doesn't seem as though the other OS's have the default count of 20 processes.

John
 
That command printed more results :).
It's still shorter than what "ps aux" gives, so, it won't be the full picture, but better than what we had until now.

Olivier
 
Back
Top