After I run the a.out ,the cons
totalram: 995859
freeram: 34103
sharedram: 0
bufferram: 58425
totalswap: 3503615
freeswap: 3495360
procs: 895
totalhigh: 785282
freehigh: 3838
mem_unit: 4096
Using free command ,the console print that:
public@sil-01:~/coke$ free
total used free shared buffers cached
Mem: 3983436 3856212 127224 0 233264 1459520
-/+ buffers/cache: 2163428 1820008
Swap: 14014460 33020 13981440
gdb the code,it seems that the info struct had right value and the return
info.totalram has value as the sysinfo printing.After the method return the
Try Class,the *mem.t =0 .
2012/12/7 Benjamin Mahler <[email protected]>
> Whoops, forgot to attach.
>
>
> On Thu, Dec 6, 2012 at 10:53 AM, Benjamin Mahler <[email protected]>wrote:
>
>> Hm.. well for one thing it seems our os::memory code is buggy on systems
>> newer than Linux 2.3.23 (i386), and 2.3.48 (all architectures). Ubuntu
>> 11.04 shipped with 2.6.38:
>>
>> // Returns the total size of main memory in bytes.
>> inline Try<uint64_t> memory()
>> {
>> #ifdef __linux__
>> struct sysinfo info;
>> if (sysinfo(&info) != 0) {
>> return Try<uint64_t>::error(strerror(errno));
>> }
>> return info.totalram;
>> #else
>> return Try<uint64_t>::error("Cannot determine the size of main memory");
>> #endif
>> }
>>
>> Note that we need to instead return info.totalram * info.mem_unit. I'll
>> file a bug for this.
>>
>> It may be related here, since your system is 32 bit, do you have more
>> than 4GB of RAM? It would be interesting to see a dump of the sysinfo
>> struct that comes out.
>>
>> I've provided a little program that will print the information, can you
>> download it and run:
>> $ g++ sysinfo.cpp && ./a.out
>>
>>
>> On Wed, Dec 5, 2012 at 10:03 PM, Hongjun Zhang <[email protected]>wrote:
>>
>>> Thanks.The system is Ubuntu 11.04-Natty 32bit.The hardware isIntel(R)
>>> Core(TM) i5 CPU 660 @ 3.33GHz 4core4G446G
>>> I configure the mesos as following
>>> #!/bin/sh
>>> export PYTHON=python2.6
>>> $(dirname $0)/configure \
>>> --with-python-headers=/usr/include/python2.6 \
>>> --with-java-home=$JAVA_HOME/include \
>>> --with-webui \
>>> --with-included-zookeeper \
>>> --prefix=/home/public/mesos ${@}
>>>
>>> gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5.1)
>>> Python 2.6.6
>>> I have install the python2.6-dev
>>> java version "1.7.0_07"
>>> Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
>>> Java HotSpot(TM) Server VM (build 23.3-b01, mixed mode)
>>>
>>> env :
>>> ORBIT_SOCKETDIR=/tmp/orbit-public
>>> SSH_AGENT_PID=2523
>>> TERM=xterm
>>> SHELL=/bin/bash
>>> HADOOP_HOME=/home/public/HadoopInstall/hadoop
>>>
>>> XDG_SESSION_COOKIE=dc942bfe3ab1e284798d220b00000005-1353394718.952925-1986790161
>>> WINDOWID=62914597
>>> OLDPWD=/home/public/mesos-0.9.0
>>> GNOME_KEYRING_CONTROL=/tmp/keyring-XmCUaf
>>> GTK_MODULES=canberra-gtk-module
>>> USER=public
>>>
>>> LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
>>> SSH_AUTH_SOCK=/tmp/keyring-XmCUaf/ssh
>>> DEFAULTS_PATH=/usr/share/gconf/gnome.default.path
>>> SESSION_MANAGER=local/sil-01:@
>>> /tmp/.ICE-unix/2492,unix/sil-01:/tmp/.ICE-unix/2492
>>> USERNAME=public
>>> XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg
>>> DESKTOP_SESSION=gnome
>>>
>>> PATH=/home/public/scala-2.9.1-1/bin:/home/public/HadoopInstall/jdk1.7.0_07/bin:/home/public/HadoopInstall/hadoop/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
>>> QT_IM_MODULE=xim
>>> MESOS_HOME=/home/public/mesos
>>> PWD=/home/public/mesos-0.9.0/build
>>> JAVA_HOME=/home/public/HadoopInstall/jdk1.7.0_07
>>> XMODIFIERS=@im=ibus
>>> GDM_KEYBOARD_LAYOUT=cn
>>> LANG=zh_CN.UTF-8
>>> GNOME_KEYRING_PID=2473
>>> HADOOP_CONF_DIR=/home/public/HadoopInstall/hadoop-config
>>> MANDATORY_PATH=/usr/share/gconf/gnome.mandatory.path
>>> GDM_LANG=zh_CN.UTF-8
>>> GDMSESSION=gnome
>>> SHLVL=1
>>> HOME=/home/public
>>> LANGUAGE=zh_CN:zh
>>> GNOME_DESKTOP_SESSION_ID=this-is-deprecated
>>> LOGNAME=public
>>>
>>> DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-43MBcJ2LDt,guid=da75db3f66f89f9cd1d7d1f2000002cf
>>> XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/
>>> LESSOPEN=| /usr/bin/lesspipe %s
>>> SCALA_HOME=/home/public/scala-2.9.1-1
>>> WINDOWPATH=8
>>> DISPLAY=:1.0
>>> GTK_IM_MODULE=ibus
>>> LESSCLOSE=/usr/bin/lesspipe %s %s
>>> PYTHON=/usr/bin/python
>>> XAUTHORITY=/var/run/gdm/auth-for-public-25iU85/database
>>> COLORTERM=gnome-terminal
>>> _=/usr/bin/env
>>>
>>> Is the information enough ?
>>> Thanks!
>>> -Coke
>>>
>>> 2012/12/6 Benjamin Hindman <[email protected]>
>>>
>>> > For whatever reason the means for determining how much memory your
>>> system
>>> > has is failing. Can you provide more information about your
>>> environment?
>>> >
>>> >
>>> > On Wed, Dec 5, 2012 at 6:45 PM, Hongjun Zhang <[email protected]>
>>> wrote:
>>> >
>>> > > Hi,
>>> > > After I run configure and make ,I used $
>>> ./bin/mesos-local.sh
>>> > > for a test ,but it print out that mem=0,I debug the code ,it seems
>>> that
>>> > > caused by Try<long> mem = utils::os::memory().The mem does't get the
>>> > value.
>>> > > I run the task on ten machines ,seven of them apparent this issue.
>>> The
>>> > log
>>> > > as follow .
>>> > > public@sil-01:~/mesos-0.9.0/build$ ./bin/mesos-local.sh
>>> > > I1206 10:16:47.445142 26488 logging.cpp:72] Logging to <stderr>
>>> > > I1206 10:16:47.447177 26503 master.cpp:268] Master started on
>>> > > 192.168.11.89:5050
>>> > > I1206 10:16:47.447293 26503 master.cpp:283] Master ID:
>>> > > 2012120610161493936320-5050-26488
>>> > > I1206 10:16:47.449432 26502 slave.cpp:190] Slave started on
>>> > > 192.168.11.89:5050
>>> > > I1206 10:16:47.449481 26502 slave.cpp:191] Slave resources: cpus=4;
>>> mem=0
>>> > > I1206 10:16:47.449890 26503 master.cpp:483] Elected as master!
>>> > > I1206 10:16:47.449950 26502 slave.cpp:356] New master detected at
>>> > > [email protected]:5050
>>> > > I1206 10:16:47.450240 26505 master.cpp:844] Attempting to register
>>> slave
>>> > > 2012120610161493936320-5050-26488-0 at [email protected]:5050
>>> > > I1206 10:16:47.450284 26505 master.cpp:1097] Master now considering a
>>> > slave
>>> > > at sil-01:5050 as active
>>> > > I1206 10:16:47.450309 26505 master.cpp:1633] Adding slave
>>> > > 2012120610161493936320-5050-26488-0 at sil-01 with cpus=4; mem=0
>>> > > I1206 10:16:47.450463 26502 slave.cpp:376] Registered with master;
>>> given
>>> > > slave ID 2012120610161493936320-5050-26488-0
>>> > > I1206 10:16:47.450479 26505 simple_allocator.cpp:69] Added slave
>>> > > 2012120610161493936320-5050-26488-0 with cpus=4; mem=0
>>> > >
>>> > > Any thought about the issue is appreciated.
>>> > >
>>> > > Thanks
>>> > >
>>> > >
>>> > > -Coke
>>> > >
>>> >
>>>
>>>
>>>
>>> --
>>> Thank you very much!
>>>
>>> Best Regards!
>>> ------------------------------
>>> *Hongjun Zhang(张鸿骏)*
>>>
>>> No.4 South Fourth Street
>>> Zhong Guan Cun
>>> Institute of Software
>>> Chinese Academy of Sciences
>>> Haidian District, Beijing, 100190Mobile:+86-188-1159-1753ChinaE-mail:
>>> [email protected]
>>>
>>
>>
>
--
Thank you very much!
Best Regards!
------------------------------
*Hongjun Zhang(张鸿骏)*
No.4 South Fourth Street
Zhong Guan Cun
Institute of Software
Chinese Academy of Sciences
Haidian District, Beijing, 100190 Mobile:+86-188-1159-1753 ChinaE-mail:
[email protected]