버전 비교

  • 이 줄이 추가되었습니다.
  • 이 줄이 삭제되었습니다.
  • 서식이 변경되었습니다.

...

코드 블럭
linenumberstrue
# ps auxf | grep -v '\[' | awk '{ print substr($0, 1, 9) substr($0, 65) }'
USER      COMMAND
root      /sbin/init
root      /lib/systemd/systemd-journald
root      /sbin/lvmetad -f
root      /lib/systemd/systemd-udevd
systemd+  /lib/systemd/systemd-timesyncd
systemd+  /lib/systemd/systemd-networkd
systemd+  /lib/systemd/systemd-resolved
root      /usr/sbin/irqbalance --foreground
root      /usr/lib/accountsservice/accounts-daemon
message+  /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
root      /lib/systemd/systemd-logind
root      php /opt/unetlab/scripts/cpulimit_daemon.php > /opt/unetlab/data/Logs/cpulimit.log 2>&1
root      /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
daemon    /usr/sbin/atd -f
root      /usr/bin/lxcfs /var/lib/lxcfs/
root      /usr/lib/policykit-1/polkitd --no-debug
root      ovsdb-server /etc/openvswitch/conf.db
              -vconsole:emer
              -vsyslog:err
              -vfile:info
              --remote=punix:/var/run/openvswitch/db.sock
              --private-key=db:Open_vSwitch,SSL,private_key
              --certificate=db:Open_vSwitch,SSL,certificate
              --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert
              --no-chdir
              --log-file=/var/log/openvswitch/ovsdb-server.log
              --pidfile=/var/run/openvswitch/ovsdb-server.pid
              --detach
root      ovs-vswitchd unix:/var/run/openvswitch/db.sock
              -vconsole:emer
              -vsyslog:err
              -vfile:info
              --mlockall
              --no-chdir
              --log-file=/var/log/openvswitch/ovs-vswitchd.log
              --pidfile=/var/run/openvswitch/ovs-vswitchd.pid
              --detach
root      /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
root      /bin/bash /opt/unetlab/html/store/app/Console/Commands/harddisk_alert
root       \_ sleep 90
root      /usr/local/sbin/guacd -p /var/run/guacd.pid
root      /usr/bin/containerd
root      /usr/sbin/qemu-ga --daemonize -m virtio-serial -p /dev/virtio-ports/org.qemu.guest_agent.0
root      /usr/bin/ovs-testcontroller
              --detach
              --pidfile=/var/run/openvswitch/ovs-testcontroller.pid pssl:
              --private-key=/etc/openvswitch-testcontroller/privkey.pem
              --certificate=/etc/openvswitch-testcontroller/cert.pem
              --ca-cert=/etc/openvswitch-testcontroller/cacert.pem
root      /sbin/agetty -o -p -- \u --noclear tty1 linux
tomcat8   /usr/lib/jvm/default-java/bin/java
              -Djava.util.logging.config.file=/var/lib/tomcat8/conf/logging.properties
              -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
              -Djava.awt.headless=true
              -XX:+UseConcMarkSweepGC
              -Djdk.tls.ephemeralDHKeySize=2048
              -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
              -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
              -Dignore.endorsed.dirs=
              -classpath /usr/share/tomcat8/bin/bootstrap.jar:/usr/share/tomcat8/bin/tomcat-juli.jar
              -Dcatalina.base=/var/lib/tomcat8
              -Dcatalina.home=/usr/share/tomcat8
              -Djava.io.tmpdir=/tmp/tomcat8-tomcat8-tmp org.apache.catalina.startup.Bootstrap start
uml-net   /usr/bin/uml_switch -unix /var/run/uml-utilities/uml_switch.ctl
root      /usr/sbin/apache2 -k start
www-data   \_ /usr/sbin/apache2 -k start
www-data   \_ /usr/sbin/apache2 -k start
root      /bin/bash /opt/unetlab/html/store/app/Console/Commands/harddisk_limit
root       \_ sleep 60
root      /bin/bash /opt/unetlab/html/store/app/Console/Commands/process_limit
root       \_ sleep 30
root      /lib/systemd/systemd --user
root       \_ (sd-pam)
syslog    /usr/sbin/rsyslogd -n
root      /usr/sbin/cron -f
root       \_ /usr/sbin/CRON -f
root           \_ /bin/sh -c /usr/bin/php /opt/unetlab/html/store/artisan keepalive 2>&1
root               \_ /usr/bin/php /opt/unetlab/html/store/artisan keepalive
mysql     /usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid

Virtual Devices

Dynamips

코드 블럭
linenumberstrue
# ps auxf | grep -v '\[' | awk '{ print substr($0, 1, 9) substr($0, 65) }'
USER      COMMAND
unl1      /opt/unetlab/wrappers/iol_wrapper -D 1 -S 1 -P 30001 -t R1 
                  -F /opt/unetlab/tmp/1/1/i86bi_linux-adventerprisek9-ms.154-1.T_AntiGNS3.bin 
                  -d 0 -e 1 -s 0 -- -n 1024 -q -m 512 -c startup-config
unl1       \_ /opt/unetlab/wrappers/iol_wrapper ...
unl1           \_ sh -c LD_LIBRARY_PATH=/opt/unetlab/addons/iol/lib 
                          /opt/...GNS3.bin 
                          -e 1 -s 0 -n 1024 -q -m 512 -c startup-config 1
unl1               \_ /opt/...GNS3.bin ...

...

코드 블럭
linenumberstrue
# ps auxf | grep -v '\[' | awk '{ print substr($0, 1, 15) substr($0, 65) }'
USER       PID  COMMAND
root     12974  /opt/qemu-2.12.0/bin/qemu-system-x86_64
                        -device virtio-net-pci,netdev=net0,mac=50:4c:ef:00:11:00
                        -netdev tap,id=net0,ifname=vunl17_0,script=no
                        -vnc :24117
                        -chardev socket,id=monitor,path=/opt/unetlab/tmp/1/17/monitor.sock,server,nowait
                        -monitor chardev:monitor
                        -smp 2
                        -m 4096
                        -name Linux
                        -uuid 5b2e66a0-df69-43d0-b36f-c6a1362d289d
                        -drive file=virtioa.qcow2,if=virtio,bus=0,unit=0,cache=none
                        -machine type=pc,accel=kvm
                        -vga virtio
                        -usbdevice tablet
                        -boot order=cd

# netstat -anp | grep 12974
tcp    0    0 0.0.0.0:30017    0.0.0.0:*    LISTEN    12974/qemu-system-x

# ls -al /proc/12974/cwd
/proc/12974/cwd -> /opt/unetlab/tmp/1/17

# ls -al /opt/unetlab/tmp/1/17

30017는 VNC 포트임. QEMU 에뮬레이터에서 vnc 옵션이 :24117 인데, 이는 30017포트(5900+24117)로 해당 VM의 디스플레이를 VNC로 제공하겠다는 뜻임.

코드 블럭
linenumberstrue
# man qemu-system-x86_64
-vnc display
     host:d
        TCP connections will only be allowed from host on display d. 
        By convention the TCP port is 5900+ d. Optionally, host can be omitted 
        in which case the server will accept connections from any host.

Files

Dynamips 는 이미지의 링크를 tmp 폴더에 생성하여 부팅

QEMU 는 디스크의 복사본을 tmp 폴더에 생성하여 부팅

VPC, docker 는 tmp 폴더에 wrapper.txt 만 생성하고 부팅

코드 블럭
title# tree /opt/unetlab/tmp
linenumberstrue
/opt/unetlab/tmp
└── 1
    ├── 1
    │   ├── iourc -> /opt/unetlab/addons/iol/bin/iourc
    │   ├── keepalive.pl -> /opt/unetlab/addons/iol/bin/keepalive.pl
    │   ├── L2-ADVENTERPRISEK9-M-15.2-IRON-20151103.bin -> /opt/unetlab/addons/iol/bin/L2-ADVENTERPRISEK9-M-15.2-IRON-20151103.bin
    │   ├── NETMAP
    │   ├── nvram_00001
    │   └── wrapper.txt
    ├── 21
    │   └── wrapper.txt
    ├── 31
    │   └── wrapper.txt
    └── 41
        ├── monitor.sock
        ├── virtioa.qcow2
        └── wrapper.txt

Code for launch emulators

...