Title: Parent Process Object is Missing · Issue #17541 · PowerShell/PowerShell · GitHub
Open Graph Title: Parent Process Object is Missing · Issue #17541 · PowerShell/PowerShell
X Title: Parent Process Object is Missing · Issue #17541 · PowerShell/PowerShell
Description: Background I want to list the processes on my system. Get-Process NPM(K) PM(M) WS(M) CPU(s) Id SI ProcessName ------ ----- ----- ------ -- -- ----------- 0 0.00 3.75 0.00 1270 …69 (sd-pam) 0 0.00 9.84 1.25 962 962 accounts-daemon 0 0.00 ...
Open Graph Description: Background I want to list the processes on my system. Get-Process NPM(K) PM(M) WS(M) CPU(s) Id SI ProcessName ------ ----- ----- ------ -- -- ----------- 0 0.00 3.75 0.00 1270 …69 (sd-pam) 0 0.00 9...
X Description: Background I want to list the processes on my system. Get-Process NPM(K) PM(M) WS(M) CPU(s) Id SI ProcessName ------ ----- ----- ------ -- -- ----------- 0 0.00 3.75 0.00 1270 …69 (sd-pam) 0 0.00 9...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/17541
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Parent Process Object is Missing","articleBody":"## Background \r\n\r\nI want to list the processes on my system. \r\n\r\n``` PowerShell\r\nGet-Process \r\n\r\n NPM(K) PM(M) WS(M) CPU(s) Id SI ProcessName\r\n ------ ----- ----- ------ -- -- -----------\r\n 0 0.00 3.75 0.00 1270 …69 (sd-pam)\r\n 0 0.00 9.84 1.25 962 962 accounts-daemon\r\n 0 0.00 0.00 0.00 117 0 acpi_thermal_pm\r\n...\r\n\r\n```\r\n\r\nFurther, I would like to sort the processes by parent. \r\n\r\nI'm on Linux. And I have a `Parent` property. I'm not sure if that is available on Windows. \r\n\r\n``` PowerShell\r\nGet-Process | Select-Object @{name='Parent'; expr={$_.Parent.Id}}, Id, Name | Sort-Object Parent, Id\r\n\r\nParent Id Name\r\n------ -- ----\r\n 105455 Web Content\r\n1 2617 firefox\r\n1 135731 code --no-sandbox --force-user-env --unity-launch --enable-crashpad\r\n1284 1362 Thunar\r\n1370 127909 thunderbird\r\n1667 1688 pwsh\r\n1688 11884 vim\r\n\r\n```\r\n\r\n## Issue\r\n\r\nThe issue I noticed was that some of the Parent Process IDs (PPID) were missing. \r\n\r\nNote there are no IDs in the Parent column below. \r\n\r\n``` PowerShell\r\nGet-Process | Select-Object @{name='Parent'; expr={$_.Parent.Id}}, Id, Name | Sort-Object Parent, Id\r\n\r\nParent Id Name\r\n------ -- ----\r\n 1 systemd\r\n 2 kthreadd\r\n 847 UVM global queue\r\n 848 UVM deferred release queue\r\n 849 UVM Tools Event Queue\r\n...\r\n 105455 Web Content\r\n 105458 Web Content\r\n...\r\n\r\n```\r\n\r\nIt is not clear to me if there is a bug with PowerShell, a bug with .NET, or something I don't understand. \r\n\r\nThe one-liner I'm issuing seems correct to me. \r\n\r\nBut I'm not getting a Parent Process ID for worker processes, which is the output I expect. \r\n\r\nI don't think there is a permission issue because I am the only user. And the native task manager shows the correct parent and child relationships for processes. \r\n\r\nThe affected processes are mostly Mozilla Firefox and Thunderbird workers. \r\n\r\n\r\n\r\n## Environment \r\n\r\n``` text\r\n$PSVersionTable | Format-Table -Wrap\r\n\r\nName Value\r\n---- -----\r\nPSVersion 7.2.4\r\nPSEdition Core\r\nGitCommitId 7.2.4\r\nOS Linux 5.18.5-1-MANJARO #1 SMP PREEMPT_DYNAMIC\r\n Thu Jun 16 12:28:47 UTC 2022\r\nPlatform Unix\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n\r\n```\r\n\r\n","author":{"url":"https://github.com/juvtib","@type":"Person","name":"juvtib"},"datePublished":"2022-06-19T21:39:24Z","url":"https://github.com/PowerShell/PowerShell/issues/17541"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6cf6253e-ab31-b74a-8c71-dae2913901d7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A318:1F2299:E81DC:148F7E:6AFDF852 |
| html-safe-nonce | 437b2f0d74c4f4cf6a095782f36ac1f4da7c0a0b2515b45675517fd193b1f99e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzE4OjFGMjI5OTpFODFEQzoxNDhGN0U6NkFGREY4NTIiLCJ2aXNpdG9yX2lkIjoiMjk4OTI2NTI1OTQ4NDU0MzA1OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a2351e8e7cf8ba8adefbeae329ac71b85ad4f76950cac7e6f9e810a5390f04c3 |
| hovercard-subject-tag | issue:1276172719 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/17541/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2ed8085d63090d0826ae2bc271cac7028623a5f35639d68bcd3c818e4fca5220/PowerShell/PowerShell/issues/17541 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2ed8085d63090d0826ae2bc271cac7028623a5f35639d68bcd3c818e4fca5220/PowerShell/PowerShell/issues/17541 |
| og:image:alt | Background I want to list the processes on my system. Get-Process NPM(K) PM(M) WS(M) CPU(s) Id SI ProcessName ------ ----- ----- ------ -- -- ----------- 0 0.00 3.75 0.00 1270 …69 (sd-pam) 0 0.00 9... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | juvtib |
| hostname | github.com |
| expected-hostname | github.com |
| None | ee3343385a977757dd145b28fabf4a119780f2615a5a36c5a89f66c9b3b5616d |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 43ae91995f6e2d5ff7a491f3de438f1f723adeaa |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width