pmap

查看Linux上程序或进程用到的库

佐手、 提交于 2020-03-18 13:29:45
某厂面试归来,发现自己落伍了!>>> ldd /path/to/program 要找出某个特定可执行依赖的库,可以使用ldd命令。这个命令调用动态链接器去找到程序的库文件依赖关系。 objdump -p /path/to/program | grep NEEDED 注意!并不推荐为任何不可信的第三方可执行程序运行ldd,因为某些版本的ldd可能会直接调用可执行程序来明确其库文件依赖关系,这样可能不安全。取而代之的是用一个更安全的方式来显示一个未知应用程序二进制文件的库文件依赖。 pldd 1100 如果你想要找出被一个运行中的进程载入的共享库,你可以使用pldd命令,它会显示出在运行时被载入一个进程里的所有共享对象。 注意你需要root权限去执行pldd命令。 pmap 1100 或者,也可以选择一个叫做pmap的命令行工具。它报告一个进程的内存映射,也能显示出运行进程的库文件依赖。 来源: oschina 链接: https://my.oschina.net/u/139930/blog/306177

Julia: Using pmap correctly

荒凉一梦 提交于 2020-01-13 02:09:09
问题 Why doesn't this do what I think it should: benjamin@benjamin-VirtualBox:~$ julia -p 3 julia> @everywhere(function foom(bar::Vector{Any}, k::Integer) println(repeat(bar[2],bar[1])); return bar; end) julia> foo={{1,"a"},{2,"b"},{3,"c"}} julia> pmap(foom, foo, 5) From worker 2: a 1-element Array{Any,1}: {1,"a"} and that is all it outputs. I was expecting pmap to iterate through each tuple in foo and call foom on it. EDIT: It works correctly when I don't pass other arguments in: julia>

Julia, run function multiple times, save results in array

假装没事ソ 提交于 2020-01-02 04:24:13
问题 I am building a microsimulation model in Julia. I have built the structure of my function and it runs great for for 1 "person". I'd like to write the script to run 100000+ people through the model and save the results in one location. Eventually I'd like to execute this in parallel. Below I have included a simple working version of the code with dummy probabilities. using Distributions # Microsim function function MicroSim(start_age, stages) stage = 0 age = start_age # Set all trackers to 0

What is wrong with this command?

我怕爱的太早我们不能终老 提交于 2019-12-24 14:01:50
问题 I'm not a software/scripting folk myself so struggling to understand what is happening here: watch -n 0.2 'ps -p $(pgrep -d',' -x snmpd) -o rss= | awk '{ i += $1 } END { print i }'' Basically I am wanting to print the Resident Set Size value of my snmp daemon 5 times a second (for fair resolution). I then intend on building from this to redirect the output to a text file for later analysis where I can put the data into a graph for instance. The trouble I have here is that I can run the

use pmap() to calculate row means of several columns

旧巷老猫 提交于 2019-12-22 13:13:20
问题 I'm trying to better understand how pmap() works within dataframes, and I get a surprising result when applying pmap() to compute means from several columns. mtcars %>% mutate(comp_var = pmap_dbl(list(vs, am, cyl), mean)) %>% select(comp_var, vs, am, cyl) In the above example, comp_var is equal to the value of vs in its row, rather than the mean of the three variables in a given row. I know that I could get accurate results for comp_var using ... mtcars %>% rowwise() %>% mutate(comp_var =

Where do these java native memory allocated from?

杀马特。学长 韩版系。学妹 提交于 2019-12-17 19:53:56
问题 JDK version is hotspot 8u_45 I researched native memory of my java process. The native memory even consumes more space than heap. However there are many native memory blocks which confuses me. The result of pmap -x for example: 00007f8128000000 65508 25204 25204 rw--- [ anon ] 00007f812bff9000 28 0 0 ----- [ anon ] 00007f812c000000 65508 24768 24768 rw--- [ anon ] 00007f812fff9000 28 0 0 ----- [ anon ] 00007f8130000000 65508 25532 25532 rw--- [ anon ] 00007f8133ff9000 28 0 0 ----- [ anon ]

Java process memory usage (jcmd vs pmap)

梦想的初衷 提交于 2019-12-17 14:05:22
问题 I have a java application running on Java 8 inside a docker container. The process starts a Jetty 9 server and a web application is being deployed. The following JVM options are passed: -Xms768m -Xmx768m . Recently I noticed that the process consumes a lot of memory: $ ps aux 1 USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND app 1 0.1 48.9 5268992 2989492 ? Ssl Sep23 4:47 java -server ... $ pmap -x 1 Address Kbytes RSS Dirty Mode Mapping ... total kB 5280504 2994384 2980776 $ jcmd 1 VM

Java process memory usage (jcmd vs pmap)

末鹿安然 提交于 2019-12-17 14:03:54
问题 I have a java application running on Java 8 inside a docker container. The process starts a Jetty 9 server and a web application is being deployed. The following JVM options are passed: -Xms768m -Xmx768m . Recently I noticed that the process consumes a lot of memory: $ ps aux 1 USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND app 1 0.1 48.9 5268992 2989492 ? Ssl Sep23 4:47 java -server ... $ pmap -x 1 Address Kbytes RSS Dirty Mode Mapping ... total kB 5280504 2994384 2980776 $ jcmd 1 VM

Julia pmap speed - parallel processing - dynamic programming

馋奶兔 提交于 2019-12-11 23:20:31
问题 I am trying to speed up filling in a matrix for a dynamic programming problem in Julia (v0.6.0), and I can't seem to get much extra speed from using pmap . This is related to this question I posted almost a year ago: Filling a matrix using parallel processing in Julia. I was able to speed up serial processing with some great help then, and I'm now trying to get extra speed from parallel processing tools in Julia. For the serial processing case, I was using a 3-dimensional matrix (essentially

Understanding memory_get_usage() and pmap

橙三吉。 提交于 2019-12-10 11:46:44
问题 I'm trying to understand memory usage of some php processes. I've tried using both get_memory_usage() and pmap , but the results seem to be off by about one order of magnitude. I've tried with both memory_get_usage() and memory_get_usage(true) , as well as memory_get_peak_usage(true) , but even with memory_get_peak_usage(true) (the largest of all three varieties) there is still a huge with what is reported via pmap. More specifically, calling memory_get_peak_usage(true) every minute within my