Giter Club home page Giter Club logo

procmaps's Introduction

procmaps

Lifecycle: experimental R build status Codecov test coverage CRAN status

The goal of procmaps is to help determine which library or other region is mapped to a specific address of a process. It is the equivalent of /proc/self/maps as a data frame, and is designed to work on all major platforms.

Installation

You can install the released version of procmaps from CRAN with:

install.packages("procmaps")

Example

This is what /proc/self/maps looks like (on Linux) when this document is rendered:

cat /proc/self/maps
#> 56390592e000-563905936000 r-xp 00000000 fd:01 2883652                    /bin/cat
#> 563905b35000-563905b36000 r--p 00007000 fd:01 2883652                    /bin/cat
#> 563905b36000-563905b37000 rw-p 00008000 fd:01 2883652                    /bin/cat
#> 563906bb9000-563906bda000 rw-p 00000000 00:00 0                          [heap]
#> 7fb42c468000-7fb42c8c7000 r--p 00000000 fd:01 29370411                   /usr/lib/locale/locale-archive
#> 7fb42c8c7000-7fb42caae000 r-xp 00000000 fd:01 15731435                   /lib/x86_64-linux-gnu/libc-2.27.so
#> 7fb42caae000-7fb42ccae000 ---p 001e7000 fd:01 15731435                   /lib/x86_64-linux-gnu/libc-2.27.so
#> 7fb42ccae000-7fb42ccb2000 r--p 001e7000 fd:01 15731435                   /lib/x86_64-linux-gnu/libc-2.27.so
#> 7fb42ccb2000-7fb42ccb4000 rw-p 001eb000 fd:01 15731435                   /lib/x86_64-linux-gnu/libc-2.27.so
#> 7fb42ccb4000-7fb42ccb8000 rw-p 00000000 00:00 0 
#> 7fb42ccb8000-7fb42ccdf000 r-xp 00000000 fd:01 15731135                   /lib/x86_64-linux-gnu/ld-2.27.so
#> 7fb42ceb2000-7fb42ceb4000 rw-p 00000000 00:00 0 
#> 7fb42cebd000-7fb42cedf000 rw-p 00000000 00:00 0 
#> 7fb42cedf000-7fb42cee0000 r--p 00027000 fd:01 15731135                   /lib/x86_64-linux-gnu/ld-2.27.so
#> 7fb42cee0000-7fb42cee1000 rw-p 00028000 fd:01 15731135                   /lib/x86_64-linux-gnu/ld-2.27.so
#> 7fb42cee1000-7fb42cee2000 rw-p 00000000 00:00 0 
#> 7ffed6a9a000-7ffed6abc000 rw-p 00000000 00:00 0                          [stack]
#> 7ffed6b08000-7ffed6b0b000 r--p 00000000 00:00 0                          [vvar]
#> 7ffed6b0b000-7ffed6b0d000 r-xp 00000000 00:00 0                          [vdso]
#> ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

Other operating systems make this information available in other form. This package provides the equivalent as a data frame, regardless of operating system:

library(procmaps)
procmap_get()
#> Converting to tibble, mute this message with `as_tibble = TRUE`.
#> # A tibble: 378 x 6
#>    from         to          perms offset  inode  pathname                       
#>    <chr>        <chr>       <chr> <chr>   <chr>  <chr>                          
#>  1 000055cc2db… 000055cc2d… r-xp  000000… 29393… /usr/lib/R/bin/exec/R          
#>  2 000055cc2dd… 000055cc2d… r--p  000000… 29393… /usr/lib/R/bin/exec/R          
#>  3 000055cc2dd… 000055cc2d… rw-p  000010… 29393… /usr/lib/R/bin/exec/R          
#>  4 000055cc2e4… 000055cc33… rw-p  000000… 0      [heap]                         
#>  5 00007f9bac9… 00007f9bac… r-xp  000000… 28991… /home/kirill/git/R/r-prof/proc…
#>  6 00007f9bac9… 00007f9bac… ---p  000040… 28991… /home/kirill/git/R/r-prof/proc…
#>  7 00007f9bacb… 00007f9bac… r--p  000030… 28991… /home/kirill/git/R/r-prof/proc…
#>  8 00007f9bacb… 00007f9bac… rw-p  000040… 28991… /home/kirill/git/R/r-prof/proc…
#>  9 00007f9bacb… 00007f9bac… r-xp  000000… 28722… /home/kirill/R-dev/glue/libs/g…
#> 10 00007f9bacb… 00007f9bac… ---p  000020… 28722… /home/kirill/R-dev/glue/libs/g…
#> # … with 368 more rows

Code of Conduct

Please note that the procmaps project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

procmaps's People

Contributors

antonov548 avatar indrajeetpatil avatar krlmlr avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

antonov548

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.