Hello Steve,<br><br>Thanks for you reply! Here is what I get when I do an strace.<br><br>I guess the container need a dedicated disk device and since it doesn&#39;t have one at the momet, its seg faulting. How would I share a disk device with a container? <br>
<br><br>[root@rajeshr-linux bin]# strace ./monitord -s localhost -p 8367 -d -v<br>execve(&quot;./monitord&quot;, [&quot;./monitord&quot;, &quot;-s&quot;, &quot;localhost&quot;, &quot;-p&quot;, &quot;8367&quot;, &quot;-d&quot;, &quot;-v&quot;], [/* 17 vars */]) = 0<br>
brk(0)                                  = 0x9c4f000<br>uname({sys=&quot;Linux&quot;, node=&quot;rajeshr-linux&quot;, ...}) = 0<br>access(&quot;/etc/ld.so.preload&quot;, R_OK)      = -1 ENOENT (No such file or directory)<br>
open(&quot;/etc/ld.so.cache&quot;, O_RDONLY)      = 3<br>fstat64(3, {st_mode=S_IFREG|0644, st_size=9708, ...}) = 0<br>mmap2(NULL, 9708, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7ffb000<br>close(3)                                = 0<br>
open(&quot;/lib/libpthread.so.0&quot;, O_RDONLY)  = 3<br>read(3, &quot;\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360G\0\0004\0\0\0&quot;..., 512) = 512<br>fstat64(3, {st_mode=S_IFREG|0755, st_size=127700, ...}) = 0<br>
mmap2(NULL, 94688, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x888000<br>mmap2(0x89c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13) = 0x89c000<br>mmap2(0x89e000, 4576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x89e000<br>
close(3)                                = 0<br>open(&quot;/lib/libc.so.6&quot;, O_RDONLY)        = 3<br>read(3, &quot;\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320`\1\0004\0\0\0&quot;..., 512) = 512<br>fstat64(3, {st_mode=S_IFREG|0755, st_size=1670312, ...}) = 0<br>
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ffa000<br>mmap2(NULL, 1390032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2d1000<br>mmap2(0x41f000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14e) = 0x41f000<br>
mmap2(0x422000, 9680, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x422000<br>close(3)                                = 0<br>mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ff9000<br>
set_thread_area({entry_number:-1 -&gt; 6, base_addr:0xb7ff96c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0<br>mprotect(0x41f000, 8192, PROT_READ)     = 0<br>
mprotect(0x89c000, 4096, PROT_READ)     = 0<br>mprotect(0x856000, 4096, PROT_READ)     = 0<br>munmap(0xb7ffb000, 9708)                = 0<br>set_tid_address(0xb7ff9708)             = 3761<br>set_robust_list(0xb7ff9710, 0xc)        = 0<br>
rt_sigaction(SIGRTMIN, {0x88c2e0, [], SA_RESTORER|SA_SIGINFO, 0x895290}, NULL, 8) = 0<br>rt_sigaction(SIGRT_1, {0x88c360, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x895290}, NULL, 8) = 0<br>rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0<br>
getrlimit(RLIMIT_STACK, {rlim_cur=10240*1024, rlim_max=RLIM_INFINITY}) = 0<br>uname({sys=&quot;Linux&quot;, node=&quot;rajeshr-linux&quot;, ...}) = 0<br>socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3<br>brk(0)                                  = 0x9c4f000<br>
brk(0x9c70000)                          = 0x9c70000<br>open(&quot;/etc/resolv.conf&quot;, O_RDONLY)      = 4<br>fstat64(4, {st_mode=S_IFREG|0644, st_size=20, ...}) = 0<br>mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ffd000<br>
read(4, &quot;nameserver 10.0.2.1\n&quot;, 4096)  = 20<br>read(4, &quot;&quot;, 4096)                       = 0<br>close(4)                                = 0<br>munmap(0xb7ffd000, 4096)                = 0<br>uname({sys=&quot;Linux&quot;, node=&quot;rajeshr-linux&quot;, ...}) = 0<br>
socket(PF_FILE, SOCK_STREAM, 0)         = 4<br>fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK)  = 0<br>connect(4, {sa_family=AF_FILE, path=&quot;/var/run/nscd/socket&quot;}, 110) = -1 ENOENT (No such file or directory)<br>close(4)                                = 0<br>
socket(PF_FILE, SOCK_STREAM, 0)         = 4<br>fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK)  = 0<br>connect(4, {sa_family=AF_FILE, path=&quot;/var/run/nscd/socket&quot;}, 110) = -1 ENOENT (No such file or directory)<br>close(4)                                = 0<br>
open(&quot;/etc/nsswitch.conf&quot;, O_RDONLY)    = 4<br>fstat64(4, {st_mode=S_IFREG|0644, st_size=1696, ...}) = 0<br>mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ffd000<br>read(4, &quot;#\n# /etc/nsswitch.conf\n#\n# An ex&quot;..., 4096) = 1696<br>
read(4, &quot;&quot;, 4096)                       = 0<br>close(4)                                = 0<br>munmap(0xb7ffd000, 4096)                = 0<br>open(&quot;/etc/ld.so.cache&quot;, O_RDONLY)      = 4<br>fstat64(4, {st_mode=S_IFREG|0644, st_size=9708, ...}) = 0<br>
mmap2(NULL, 9708, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb7ffb000<br>close(4)                                = 0<br>open(&quot;/lib/libnss_files.so.2&quot;, O_RDONLY) = 4<br>read(4, &quot;\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\30\0\0004\0\0\0&quot;..., 512) = 512<br>
fstat64(4, {st_mode=S_IFREG|0755, st_size=50840, ...}) = 0<br>mmap2(NULL, 45712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x649000<br>mmap2(0x653000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x9) = 0x653000<br>
close(4)                                = 0<br>mprotect(0x653000, 4096, PROT_READ)     = 0<br>munmap(0xb7ffb000, 9708)                = 0<br>open(&quot;/etc/host.conf&quot;, O_RDONLY)        = 4<br>fstat64(4, {st_mode=S_IFREG|0644, st_size=17, ...}) = 0<br>
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ffd000<br>read(4, &quot;order hosts,bind\n&quot;, 4096)     = 17<br>read(4, &quot;&quot;, 4096)                       = 0<br>close(4)                                = 0<br>
munmap(0xb7ffd000, 4096)                = 0<br>futex(0x4237e0, FUTEX_WAKE, 2147483647) = 0<br>open(&quot;/etc/hosts&quot;, O_RDONLY)            = 4<br>fcntl64(4, F_GETFD)                     = 0<br>fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0<br>
fstat64(4, {st_mode=S_IFREG|0644, st_size=42, ...}) = 0<br>mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ffd000<br>read(4, &quot;127.0.0.1 localhost.localdomain &quot;..., 4096) = 42<br>close(4)                                = 0<br>
munmap(0xb7ffd000, 4096)                = 0<br>fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0<br>mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ffd000<br>write(1, &quot;Just defined sockaddr-&gt;sin_addr.&quot;..., 50Just defined sockaddr-&gt;sin_addr.in_addr=(100007f)<br>
) = 50<br>open(&quot;/proc/stat&quot;, O_RDONLY)            = 4<br>fstat64(4, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0<br>mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ffc000<br>read(4, &quot;cpu  107 0 137 3102929 8 0 0 0\nc&quot;..., 4096) = 159<br>
close(4)                                = 0<br>munmap(0xb7ffc000, 4096)                = 0<br>open(&quot;/proc/diskstats&quot;, O_RDONLY)       = -1 ENOENT (No such file or directory)<br>--- SIGSEGV (Segmentation fault) @ 0 (0) ---<br>
+++ killed by SIGSEGV +++<br><br>Thanks,<br>Vidhya<br><br><div class="gmail_quote">On Fri, Jun 26, 2009 at 12:06 PM, Steven Tardy <span dir="ltr">&lt;<a href="mailto:sjt5@its.msstate.edu">sjt5@its.msstate.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">Vidhya Nagarajan wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello everyone,<br>
<br>
I am new to OpenVZ and so far I have liked it a lot. The Quick installation<br>
guide is extremely useful. I am trying to run a thermal emulation model<br>
inside a container. I have installed all the necessary packages, However,<br>
When I run the thermal emulation software which basically collects the power<br>
consumed by the components(cpu,network,disk) of the machine, I get a<br>
segmentation fault. When I run the same in the host node, I don&#39;t get any<br>
error and the software runs smoothly.<br>
<br>
For the thermal emulation model I need to set the /dev/sda properly. However<br>
when I tried to run /dev from the container I could not get sda or hda but<br>
rather found &quot;pts&quot;. what does that mean?<br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
>From inside the container :<br>
</blockquote>
<br>
[root@rajeshr-linux bin]# ./monitord -p 8367 -s localhost -d -v<br>
Just defined sockaddr-&gt;sin_addr.in_addr=(100007f)<br>
Segmentation fault<br>
<br>
Is it because the container is not given access to the power modules in the<br>
host node? I have mounted three of the folders from the host node to the<br>
container using the command<br>
</blockquote>
<br></div>
that software probably reads from something in /proc<br>
<br>
troubleshooting 101 (strace):<br>
 strace ./monitord -p 8367 -s localhost -d -v<br>
<br>
see what errors strace returns<br>
<br>
-- <br>
Steven Tardy<br>
Systems Programmer<br>
Information Technology Infrastructure<br>
Information Technology Services<br>
Mississippi State University<br>
<a href="mailto:sjt5@its.msstate.edu" target="_blank">sjt5@its.msstate.edu</a><br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openvz.org" target="_blank">Users@openvz.org</a><br>
<a href="https://openvz.org/mailman/listinfo/users" target="_blank">https://openvz.org/mailman/listinfo/users</a><br>
</blockquote></div><br><br>