Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More ps_handle class methods #24

Open
8 of 17 tasks
gaborcsardi opened this issue Jul 22, 2018 · 8 comments
Open
8 of 17 tasks

More ps_handle class methods #24

gaborcsardi opened this issue Jul 22, 2018 · 8 comments
Labels
feature a feature request or enhancement

Comments

@gaborcsardi
Copy link
Member

gaborcsardi commented Jul 22, 2018

  • nice() (get + set)
  • ionice()
  • rlimit()
  • io_counters()
  • num_ctx_switches()
  • num_fds()
  • num_handles()
  • threads()
  • cpu_percent()
  • cpu_affinity()
  • cpu_num()
  • memory_full_info()
  • memory_percent()
  • memory_maps()
  • open_files()
  • connections()
  • wait()
@gaborcsardi gaborcsardi added the feature a feature request or enhancement label Feb 11, 2020
@mike-lawrence
Copy link

mike-lawrence commented Jun 22, 2021

+1 for set_cpu_affinity! Just needs taskset on Linux, but dunno about other OSs

@gaborcsardi
Copy link
Member Author

Calling external commands is not great in R, and small Docker containers might not have taskset. But there is an easy API for this on Linux: https://linux.die.net/man/2/sched_getaffinity

There is also API for it on Windows: https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getprocessaffinitymask

It seems impossible on macOS, though.

@brianmsm
Copy link

I was just looking for the memory_full_info function. I understand it's still in the process of implementation, right?

@gaborcsardi
Copy link
Member Author

@brianmsm Well, these are things I might implement in the future, or things I am happy to get help with.

What do you need from memory_full_info()? There is ps_memory_info() with some basic information:

ps::ps_memory_info()
         rss          vms      pfaults      pageins
    81592320 419098476544         5515           42

@brianmsm
Copy link

brianmsm commented Apr 15, 2022

Well, following the psutil documentation in python, the memory_full_info() function allows access to uss (Unique Set Size), pss (Proportional Set Size) and swap information. In my case I am very interested in getting the swap memory information used in a particular process.

@gaborcsardi
Copy link
Member Author

@brianmsm Happening here: #122, Linux seems to be working well.

@brianmsm
Copy link

Great! Thank you very much, I'll be waiting for you to join the main branch :D

@gaborcsardi
Copy link
Member Author

CPU affinity happening here, FYI: #123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants