Cross-platform process cpu % and memory usage of a PID
find process info by port/pid/name etc.
Get the ID of the process that uses a certain port
Get PID from a port
Generate a slug – transliteration with a lot of options
kill trees of processes
Damon utilities for Simple daemonized scripts / programs
TypeScript definitions for pidusage
Logfmt transport for pino
JSON logging patcher for Next.js
kill trees of processes
Golemio PID Module
Get PID of a running process
Common token types for decoding and encoding numeric and string values
A Bonjour/Zeroconf implementation in TypeScript
Get working directory of process by PID - cross platform
Test if a process with a given pid is running
Manage a pid file.
when you want to fire an event no matter how a process exits.
Syslog parser and producer
A Promise-based interface into processes created by child_process.spawn
Fetch a Windows process tree fast
Prettifier for Pino log lines
Get running processes
Minimal PID controller primitives
Composable facade crate for RustUse control-system primitives
gem for automatic checking, creation and deletion pid-file of an application.
Used for locking processes via PID and file (daemon style).
File locks using flock and PID file locks with stale detection for coordinating between processes. Timeout support and automatic cleanup.
Interates through a series of xml files and modifies their content based on the setting defined in a configuration file
Multiple rails instances writing to the same log cause entries to be interleaved, making them hard to ready. This command line script groups them by request, using the pid.
Heel is a small static web server for use when you need a quick web server for a directory. Once the server is running, heel will use (https://rubygems.org/gems/launchy/) to open your browser at the URL of your document root. Run it right now! `gem exec heel` ----- Heel is built using (https://github.com/rack/rack) and (https://puma.io) % heel Launching your browser... Puma starting in single mode... * Puma version: 6.2.1 (ruby 3.2.2-p53) ("Speaking of Now") * Min threads: 0 * Max threads: 5 * Environment: none * PID: 11322 * Listening on http://0.0.0.0:4331 Use Ctrl-C to stop Or run it in the background % heel --daemonize Launching your browser at http://0.0.0.0:4331/ % heel --kill Sending TERM to process 3304 Done.
= Cirron Cirron measures a piece of Ruby code and reports back several performance counters: CPU instruction count, branch misses, page faults and time spent measuring. It uses the Linux perf events interface or @ibireme's KPC demo[https://gist.github.com/ibireme/173517c208c7dc333ba962c1f0d67d12] on OSX. It can also trace syscalls using +strace+, Linux only! == Prerequisites - Linux with perf events support / Apple ARM OSX - C++ - Ruby 3.x == Usage === Performance Counters $ sudo irb irb(main):001> require 'cirron' => true irb(main):002* c = Cirron::collector do irb(main):003* puts "Hello" irb(main):004> end Hello => Counter(time_enabled_ns: 110260, instruction_count: 15406, branch_misses: 525, page_faults: 0) === Tracing Syscalls $ sudo irb irb> require 'cirron' => true irb> trace = Cirron::tracer do irb> # Your code here irb> puts "Hello" irb> end => [#<Syscall:0x00007c6c1a4b3608 @args="1, [{iov_base=\"Hello\", iov_len=5}, {iov_base=\"\\n\", iov_len=1}], 2", @duration="0.000201", @name="writev", @pid="2261962", @retval="6", @timestamp="1720285300.334976">] # Save the trace for ingesting to Perfetto irb> File.write("/tmp/trace", Cirron::to_tef(trace)) => 267 === Tampering with Syscalls Available tampering actions are: error: Inject a fault with the specified errno. retval: Inject a success with the specified return value. signal: Deliver the specified signal on syscall entry. delay_enter: Delay syscall entry by the specified time. delay_exit: Delay syscall exit by the specified time. poke_enter: Modify memory at argN on syscall entry. poke_exit: Modify memory at argN on syscall exit. syscall: Inject a different syscall instead. The when argument can be used to specify when to perform the tampering. See the Tampering section of the [strace manual page](https://man7.org/linux/man-pages/man1/strace.1.html) for more detailed explanaition of the arguments. ``` $ sudo irb irb> require 'cirron' irb> injector = Cirron.injector irb> injector.inject("openat", "error", "ENOSPC") irb> injector.inject("openat", "delay_enter", "1s", when_condition="2+2") irb> injector.run do irb> # Open now fails with "No space left on device" and every irb> # other call to `openat` will be delayed by 1s. irb> File.open("test.txt", "w") irb> end ``` == Additional Information For more detailed information, please visit the project's GitHub page: https://github.com/s7nfo/Cirron