Giter Club home page Giter Club logo

Comments (8)

dalance avatar dalance commented on July 2, 2024

procs uses /proc to collect process information.
Unfortunately, macOS doesn't support /proc, so I can't support macOS.

Process collection through sysctl for macOS can be implemented, but it is difficult because I don't have macOS environment.

from procs.

dalance avatar dalance commented on July 2, 2024

I found process information library for macOS.
https://crates.io/crates/libproc

By using it, macOS support may be available.

from procs.

dalance avatar dalance commented on July 2, 2024

I released v0.5.1. This version can be built on macOS.

from procs.

messense avatar messense commented on July 2, 2024

v0.5.1 doesn't compile on macOS Mojave?

error[E0432]: unresolved import `libproc::libproc::proc_pid::TcpSIState`
 --> /Users/messense/.cargo/registry/src/github.com-1ecc6299db9ec823/procs-0.5.1/src/columns/tcp_port.rs:4:5
  |
4 | use libproc::libproc::proc_pid::TcpSIState;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TcpSIState` in `libproc::proc_pid`

error[E0432]: unresolved imports `libproc::libproc::proc_pid::InSockInfo`, `libproc::libproc::proc_pid::ListFDs`, `libproc::libproc::proc_pid::ListThreads`, `libproc::libproc::proc_pid::ProcFDType`, `libproc::libproc::proc_pid::RUsageInfoV2`, `libproc::libproc::proc_pid::SocketFDInfo`, `libproc::libproc::proc_pid::SocketInfoKind`, `libproc::libproc::proc_pid::TcpSockInfo`
 --> /Users/messense/.cargo/registry/src/github.com-1ecc6299db9ec823/procs-0.5.1/src/process.rs:5:20
  |
5 |     self, BSDInfo, InSockInfo, ListFDs, ListThreads, ProcFDType, ProcType, RUsageInfoV2,
  |                    ^^^^^^^^^^  ^^^^^^^  ^^^^^^^^^^^  ^^^^^^^^^^            ^^^^^^^^^^^^ no `RUsageInfoV2` in `libproc::proc_pid`
  |                    |           |        |            |
  |                    |           |        |            no `ProcFDType` in `libproc::proc_pid`. Did you mean to use `ProcType`?
  |                    |           |        no `ListThreads` in `libproc::proc_pid`
  |                    |           no `ListFDs` in `libproc::proc_pid`
  |                    no `InSockInfo` in `libproc::proc_pid`
6 |     SocketFDInfo, SocketInfoKind, TaskAllInfo, TaskInfo, TcpSockInfo, ThreadInfo,
  |     ^^^^^^^^^^^^  ^^^^^^^^^^^^^^                         ^^^^^^^^^^^ no `TcpSockInfo` in `libproc::proc_pid`
  |     |             |
  |     |             no `SocketInfoKind` in `libproc::proc_pid`
  |     no `SocketFDInfo` in `libproc::proc_pid`

error[E0425]: cannot find function `pidrusage` in module `proc_pid`
  --> /Users/messense/.cargo/registry/src/github.com-1ecc6299db9ec823/procs-0.5.1/src/process.rs:91:37
   |
91 |                 let res = proc_pid::pidrusage::<RUsageInfoV2>(p as i32).ok();
   |                                     ^^^^^^^^^ not found in `proc_pid`

error[E0425]: cannot find function `listpidinfo` in module `proc_pid`
   --> /Users/messense/.cargo/registry/src/github.com-1ecc6299db9ec823/procs-0.5.1/src/process.rs:110:23
    |
110 |             proc_pid::listpidinfo::<ListThreads>(pid, curr_task.ptinfo.pti_threadnum as usize);
    |                       ^^^^^^^^^^^ not found in `proc_pid`

error[E0425]: cannot find function `listpidinfo` in module `proc_pid`
   --> /Users/messense/.cargo/registry/src/github.com-1ecc6299db9ec823/procs-0.5.1/src/process.rs:123:29
    |
123 |         let fds = proc_pid::listpidinfo::<ListFDs>(pid, curr_task.pbsd.pbi_nfiles as usize);
    |                             ^^^^^^^^^^^ not found in `proc_pid`

error[E0425]: cannot find function `pidfdinfo` in module `proc_pid`
   --> /Users/messense/.cargo/registry/src/github.com-1ecc6299db9ec823/procs-0.5.1/src/process.rs:128:55
    |
128 |                         if let Ok(socket) = proc_pid::pidfdinfo::<SocketFDInfo>(pid, fd.proc_fd) {
    |                                                       ^^^^^^^^^ did you mean `pidinfo`?

error[E0425]: cannot find function `pidrusage` in module `proc_pid`
   --> /Users/messense/.cargo/registry/src/github.com-1ecc6299db9ec823/procs-0.5.1/src/process.rs:149:34
    |
149 |         let curr_res = proc_pid::pidrusage::<RUsageInfoV2>(pid).ok();
    |                                  ^^^^^^^^^ not found in `proc_pid`

error[E0277]: the trait bound `libproc::libproc::proc_pid::ThreadInfo: libproc::libproc::proc_pid::PIDInfo` is not satisfied
   --> /Users/messense/.cargo/registry/src/github.com-1ecc6299db9ec823/procs-0.5.1/src/process.rs:114:37
    |
114 |                 if let Ok(thread) = proc_pid::pidinfo::<ThreadInfo>(pid, t) {
    |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `libproc::libproc::proc_pid::PIDInfo` is not implemented for `libproc::libproc::proc_pid::ThreadInfo`
    |
    = note: required by `libproc::libproc::proc_pid::pidinfo`

error: aborting due to 8 previous errors

Some errors occurred: E0277, E0425, E0432.
For more information about an error, try `rustc --explain E0277`.

rustc 1.32.0 (9fda7c223 2019-01-16)

from procs.

dalance avatar dalance commented on July 2, 2024

It seems to be publishing failure.
I think build from git repository will be success like below:

git clone https://github.com/dalance/procs.git
cd procs
cargo build --release

I'll fix it.

from procs.

dalance avatar dalance commented on July 2, 2024

I fixed at v0.5.2

from procs.

messense avatar messense commented on July 2, 2024

Thanks!

from procs.

dalance avatar dalance commented on July 2, 2024

Thanks!

from procs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.