ProductPromotion
Logo

Node.JS

made by https://0x3d.site

GitHub - automation-stack/ctrace: Well-formatted and improved trace system calls and signals (when the debugger does not help)
Well-formatted and improved trace system calls and signals (when the debugger does not help) - automation-stack/ctrace
Visit Site

GitHub - automation-stack/ctrace: Well-formatted and improved trace system calls and signals (when the debugger does not help)

GitHub - automation-stack/ctrace: Well-formatted and improved trace system calls and signals (when the debugger does not help)

ctrace

Well-formatted and improved trace system calls and signals (when the debugger does not help).

Why?

Awesome tools strace and dtruss have only one drawback: too much information which is hard to understand without additional sources of information and various configuration options. ctrace resolves it.

ctrace are indispensable in the following cases

  • Debugging complex performance issues or not identified unhandled errors and exceptions in own code or someone else's code
  • Learning OS kernel

Let's try it!

What do you think how difficult it is to display a hint for using CLI utility, let us say NPM?

> ctrace -c "npm --help"

What we see?! What NPM does to simply display help?

  • over 6800 system calls elapsed over 650 msec!
  • 7 child processes :open_mouth:
  • aims to open over 400 files

Сlearly there is something to improve! :muscle:

Features

  • Supported platforms: OSx (dtruss), Linux (strace)
  • Trace command or attach to process (with forks following)
  • Syscall details in output (number, description, synonyms, is it platform specific syscall) pread (preadv), 534 -- read or write data into multiple
  • Resolving errno in syscall result Err#22 -> EINVAL : Invalid argument (only OSx)
  • Prints by default only syscall with errors, with -v prints all output
  • Filter output with syscall list -f "lstat,open"

Installation

$> npm install -g ctrace
$> ctrace --help

Usage: ctrace [options]

 ctrace - well-formatted and improved trace system calls and signals

 Options:

   -h, --help               output usage information
   -V, --version            output the version number
   -p, --pid [pid]          process id to trace
   -c, --cmd [cmd]          command to trace
   -f, --filter [syscall,]  trace syscall only from list
   -v, --verbose            print all syscalls (by default only with errors)

 Examples:

   $ ctrace -p 2312 -v
   $ ctrace -c "ping google.com"

Troubleshooting

OSx : Dtrace cannot control executables signed with restricted entitlements

As you may know Apple released their new OS X revision 10.11 this year with a great security feature built-in: System Integrity Protection. In a nutshell, this mechanism protects any system data and important filesystem components (like /System or /usr) from being modified by user; even if they are root. SIP also disables any use of code-injection and debugging techniques for third-party software, so some of your favorite hacks may not work anymore. ...

Completely disable SIP

Although not recommended by Apple, you can entirely disable System Integrity Protection on you Mac. Here's how:

Boot your Mac into Recovery Mode: reboot it and hold cmd+R until a progress bar appears. Choose the language and go to Utilities menu. Choose Terminal there. Enter this command to disable System Integrity Protection:

$> csrutil disable

It will ask you to reboot — do so and you're free from SIP!

http://internals.exposed/blog/dtrace-vs-sip.html#fnref1

Articles
to learn more about the nodejs concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about NodeJS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory