SystemD: a few sample scripts to run Selenium Hub

[Work-In-Progress post]

 

This morning, I crafted a few systemd unit files to help me manage running a Selenium Hub. As an extra benefit, I have some stuff ready for whenever I move to using CoreOS. đŸ™‚

I'll keep the files here:

 

https://github.com/PortNumber53/systemd-stuffs/tree/master/selenium-hub

 

So if you're familiar with git, systemd and docker, go have fun, otherwise stick around and I'll do my best to guide you through this.

 

How to take advantage of these scripts:

First of all, those are heavily base on documentation from https://github.com/SeleniumHQ/docker-selenium ( credits to them )

I assume you have decent knowledge of your Linux distribuition. I like ArchLinux so commands will be targetted to it. Feel free to contribute in the comments for other distros and I'll keep the post updated.

 

 

1. Install tools you'll need.

[sample@samplearch ~]$ sudo pacman -S git docker
[sudo] password for sample:
resolving dependencies...
looking for conflicting packages...

Packages (6) bridge-utils-1.5-2  containerd-0.2.2-1  perl-error-0.17024-1  runc-0.1.1-1  docker-1:1.11.2-2  git-2.9.0-1

Total Download Size:   16.53 MiB
Total Installed Size:  88.46 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 bridge-utils-1.5-2-x86_64                              13.4 KiB  0.00B/s 00:00 [#############################################] 100%
 perl-error-0.17024-1-any                               18.4 KiB  0.00B/s 00:00 [#############################################] 100%
 git-2.9.0-1-x86_64                                      4.5 MiB  2.62M/s 00:02 [#############################################] 100%
 runc-0.1.1-1-x86_64                                  1389.0 KiB  6.25M/s 00:00 [#############################################] 100%
 containerd-0.2.2-1-x86_64                               3.9 MiB  4.07M/s 00:01 [#############################################] 100%
 docker-1:1.11.2-2-x86_64                                6.7 MiB  4.28M/s 00:02 [#############################################] 100%
(6/6) checking keys in keyring                                                  [#############################################] 100%
(6/6) checking package integrity                                                [#############################################] 100%
(6/6) loading package files                                                     [#############################################] 100%
(6/6) checking for file conflicts                                               [#############################################] 100%
(6/6) checking available disk space                                             [#############################################] 100%
:: Processing package changes...
(1/6) installing perl-error                                                     [#############################################] 100%
(2/6) installing git                                                            [#############################################] 100%
Optional dependencies for git
    tk: gitk and git gui
    perl-libwww: git svn
    perl-term-readkey: git svn
    perl-mime-tools: git send-email
    perl-net-smtp-ssl: git send-email TLS support
    perl-authen-sasl: git send-email TLS support
    python2: various helper scripts
    subversion: git svn
    cvsps2: git cvsimport
    gnome-keyring: GNOME keyring credential helper
(3/6) installing runc                                                           [#############################################] 100%
(4/6) installing containerd                                                     [#############################################] 100%
(5/6) installing bridge-utils                                                   [#############################################] 100%
(6/6) installing docker                                                         [#############################################] 100%
Optional dependencies for docker
    btrfs-progs: btrfs backend support
    lxc: lxc backend support
:: Running post-transaction hooks...
(1/1) Updating manpage index...
[sample@samplearch ~]$

 

 

2. Clone the repo to any folder you'd like

[sample@samplearch ~]$ git clone https://github.com/PortNumber53/systemd-stuffs
Cloning into 'systemd-stuffs'...
remote: Counting objects: 37, done.
remote: Total 37 (delta 0), reused 0 (delta 0), pack-reused 37
Unpacking objects: 100% (37/37), done.
Checking connectivity... done.
[sample@samplearch ~]$ cd systemd-stuffs/
[sample@samplearch systemd-stuffs]$

 

3. Create a symlink to the hub unit and start it

[root@samplearch system]# cd /usr/lib/systemd/system
[root@samplearch system]# ln -s /home/sample/systemd-stuffs/selenium-hub/selenium-grid-hub.service
[root@samplearch system]# systemctl start selenium-grid-hub.service
[root@samplearch system]#

After the docker pulls the image and starts the contaner, you can check the status for the service:

 

[root@samplearch system]# systemctl status selenium-grid-hub.service
* selenium-grid-hub.service - Selenium Grid Hub
   Loaded: loaded (/home/sample/systemd-stuffs/selenium-hub/selenium-grid-hub.service; disabled; vendor preset: disabled)
   Active: active (running) since Tue 2016-07-05 14:09:34 PDT; 18s ago
  Process: 8516 ExecStop=/usr/bin/docker stop selenium-hub (code=exited, status=0/SUCCESS)
  Process: 8629 ExecStartPre=/usr/bin/docker pull selenium/hub:latest (code=exited, status=0/SUCCESS)
  Process: 8589 ExecStartPre=/usr/bin/docker rm selenium-hub (code=exited, status=0/SUCCESS)
  Process: 8577 ExecStartPre=/usr/bin/docker kill selenium-hub (code=exited, status=1/FAILURE)
 Main PID: 8637 (docker)
    Tasks: 6 (limit: 512)
   Memory: 4.5M
      CPU: 66ms
   CGroup: /system.slice/selenium-grid-hub.service
           `-8637 /usr/bin/docker run -p 4444:4444 --name selenium-hub selenium/hub:latest

Jul 05 14:09:35 samplearch docker[8637]: 21:09:35.343 INFO - Launching Selenium Grid hub
Jul 05 14:09:36 samplearch docker[8637]: 2016-07-05 21:09:36.050:INFO::main: Logging initialized @887ms
Jul 05 14:09:36 samplearch docker[8637]: 21:09:36.077 INFO - Will listen on 4444
Jul 05 14:09:36 samplearch docker[8637]: 21:09:36.129 INFO - Will listen on 4444
Jul 05 14:09:36 samplearch docker[8637]: 2016-07-05 21:09:36.137:INFO:osjs.Server:main: jetty-9.2.z-SNAPSHOT
Jul 05 14:09:36 samplearch docker[8637]: 2016-07-05 21:09:36.201:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandl
Jul 05 14:09:36 samplearch docker[8637]: 2016-07-05 21:09:36.224:INFO:osjs.ServerConnector:main: Started ServerConnector@dc1556d{HTT
Jul 05 14:09:36 samplearch docker[8637]: 2016-07-05 21:09:36.224:INFO:osjs.Server:main: Started @1061ms
Jul 05 14:09:36 samplearch docker[8637]: 21:09:36.225 INFO - Nodes should register to http://172.17.0.2:4444/grid/register/
Jul 05 14:09:36 samplearch docker[8637]: 21:09:36.225 INFO - Selenium Grid hub is up and running

If you want to start the hub on boot, do this:

[root@samplearch system]# systemctl enable selenium-grid-hub.service

 

4. Create a symlink and start the chrome node service:

[root@samplearch system]# ln -s /home/sample/systemd-stuffs/selenium-hub/selenium-chrome-node\@.service
[root@samplearch system]# systemctl start selenium-chrome-node@12000.service
[root@samplearch system]#

Because this unit is a template, you will see that it has an "@" in its name. Also note that when starting the service, you can tell which port should be exposed on the VNC server (you can connect to the node using a VNC client). For this sample I am using port 12000.

This allows you to run multiple chome nodes if you need.

 

5. Do the same for a Firefox node service:

[root@samplearch system]# ln -s /home/sample/systemd-stuffs/selenium-hub/selenium-firefox-node\@.service
[root@samplearch system]# systemctl start selenium-firefox-node@30000.service
[root@samplearch system]#

For this example, I am exposing port 30000.

 

 

Happy times using Selenium

 

 

 

 


 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CoreOS: Resizing partition c0d0p9 on a HP DL360 G5

I recently installed CoreOS on my HP DL360 G5 and notice that even though I setup a hardware-raid 5 with 6 72GB SAS drives, my ninth partition was only 2GB in size.

After some research I found out that CoreOS is supposed to enlarge the ninth partition automatically but that didn't happen for my DL360, so I went digging.

 

After a quick google search I saw that there is a patch for that:

https://github.com/coreos/bugs/issues/1037


Unfortunatelly it doesn't seem to be in the stable channel (at the time of my installation), so I was trying to manually apply the change, which then made me realize that / and /usr are mounted read-only.

So I checked what /usr/lib64/coreos/extend-filesystems does and I had only to issue the following commands as root:

 

dl360g5 ~ # cgpt resize  /dev/cciss/c0d0p9
dl360g5 ~ # resize2fs /dev/cciss/c0d0p9
resize2fs 1.42.13 (17-May-2015)
Filesystem at /dev/cciss/c0d0p9 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 22
The filesystem on /dev/cciss/c0d0p9 is now 88960814 (4k) blocks long.

 

Using gdisk to confirm:

dl360g5 ~ # gdisk /dev/cciss/c0d0
GPT fdisk (gdisk) version 0.8.10

Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): p
Disk /dev/cciss/c0d0: 716544402 sectors, 341.7 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): FF0E5BB2-0C8E-495C-82C2-C1BDD46AAA0D
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 716544368
Partitions will be aligned on 2048-sector boundaries
Total free space is 4062 sectors (2.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            4096          266239   128.0 MiB   EF00  EFI-SYSTEM
   2          266240          270335   2.0 MiB     EF02  BIOS-BOOT
   3          270336         2367487   1024.0 MiB  FFFF  USR-A
   4         2367488         4464639   1024.0 MiB  FFFF  USR-B
   6         4464640         4726783   128.0 MiB   8300  OEM
   7         4726784         4857855   64.0 MiB    FFFF  OEM-CONFIG
   9         4857856       716544368   339.4 GiB   FFFF  ROOT

Command (? for help): q

And after rebooting:

 

Last login: Fri Dec 25 00:07:35 2015 from 192.168.1.151
CoreOS stable (835.9.0)
Failed Units: 1
  extend-filesystems.service
core@dl360g5 ~ $ df -h
Filesystem         Size  Used Avail Use% Mounted on
devtmpfs            16G     0   16G   0% /dev
tmpfs               16G     0   16G   0% /dev/shm
tmpfs               16G  480K   16G   1% /run
tmpfs               16G     0   16G   0% /sys/fs/cgroup
/dev/cciss/c0d0p9  329G   41M  316G   1% /
/dev/cciss/c0d0p3  985M  492M  442M  53% /usr
/dev/cciss/c0d0p1  128M   35M   94M  27% /boot
tmpfs               16G     0   16G   0% /media
tmpfs               16G     0   16G   0% /tmp
/dev/cciss/c0d0p6  108M   52K   99M   1% /usr/share/oem
core@dl360g5 ~ $

 

And now I have all the space I can from my raid-5 đŸ™‚

 

 

 

 

Mapping multiple domains to different nodejs ports using nginx

At the moment of this writing, I only have one VPS, so it wouldn't take long for me to be running more than 1 node app in it.

Since I want to keep all of them working in this semi-production environment (and in a box I have at home). node cannot be using the same port and I don't want to keep stop/restarting an app everytime I'm working on it.

 

Since I've been pretty happy using nginx as a reverse proxy for Apache and a nodejs, then I decided to keep using it and figure how to have multiple nodejs apps running.

 

My scenario, (YMMV):

– I want to have mutiple domains resolving to the same box

– I don't want to change the URL for socket.io

– I know I need to use different ports for different nodejs apps

 

So after googling for a while and discovering that IF is evil. I stumble upon "map" which let me do exactly what I wanted:

Here's the relevant sections of nginx.com (the names have been changed to protect the innocents)

 

http {
.
.
.
    map $http_host $custom_nodejs_port {
        default 50000;
        domain1.com   50000;
        domain2.com   30000;
    }
.
.

server {
        location /socket.io/ {
            rewrite ^/node(.*)$ $1 break;
            proxy_pass http://127.0.0.1:$custom_nodejs_port;

            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";

            proxy_set_header Host $host;
        }
.
.
}

This way I can have multiple nodejs applications running in different ports and nginx will map connections to different domains to them.

The only downside is that I need to reload the config and it's not automatic. Maybe soon…..

 

 

 

Archlinux: Setting up SALT Stack

Setup a salt stack server to keep all your computers properly configure when you reformat them:

 

 

1. Install SALT on a box that is accessible from anywhere that will become your salt master:

 

# pacman -S salt
resolving dependencies...
looking for inter-conflicts...

Packages (19): apache-libcloud-0.14.1-1  libsodium-0.5.0-1  libxslt-1.1.28-3  libyaml-0.1.6-1  python2-crypto-2.6.1-2  python2-jinja-2.7.3-1 python2-lxml-3.3.5-1  python2-m2crypto-0.22.3-1  python2-markupsafe-0.23-1  python2-msgpack-0.4.2-1  python2-psutil-2.1.1-1 python2-pyzmq-14.3.0-1  python2-requests-2.3.0-1  python2-setuptools-4.0.1-1  python2-systemd-212-2  python2-yaml-3.11-1  sshpass-1.05-1 zeromq-4.0.4-3  salt-2014.1.4-1

Total Download Size:    6.72 MiB
Total Installed Size:   43.49 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages ...
 python2-crypto-2.6.1-2-x86_64                                     374.6 KiB   916K/s 00:00 [######################################################] 100%
 python2-setuptools-4.0.1-1-any                                    319.4 KiB  3.80M/s 00:00 [######################################################] 100%
 python2-markupsafe-0.23-1-x86_64                                   23.2 KiB  0.00B/s 00:00 [######################################################] 100%
 libxslt-1.1.28-3-x86_64                                           352.2 KiB  4.25M/s 00:00 [######################################################] 100%
 python2-lxml-3.3.5-1-x86_64                                       659.8 KiB  7.76M/s 00:00 [######################################################] 100%
 python2-jinja-2.7.3-1-any                                         255.6 KiB   250M/s 00:00 [######################################################] 100%
 python2-m2crypto-0.22.3-1-x86_64                                  173.6 KiB  0.00B/s 00:00 [######################################################] 100%
 python2-msgpack-0.4.2-1-x86_64                                     54.2 KiB  0.00B/s 00:00 [######################################################] 100%
 python2-psutil-2.1.1-1-x86_64                                      88.0 KiB  0.00B/s 00:00 [######################################################] 100%
 libsodium-0.5.0-1-x86_64                                          141.0 KiB  0.00B/s 00:00 [######################################################] 100%
 zeromq-4.0.4-3-x86_64                                             532.6 KiB   130M/s 00:00 [######################################################] 100%
 python2-pyzmq-14.3.0-1-x86_64                                     262.8 KiB   128M/s 00:00 [######################################################] 100%
 python2-systemd-212-2-x86_64                                       42.1 KiB  0.00B/s 00:00 [######################################################] 100%
 python2-requests-2.3.0-1-any                                      304.4 KiB   149M/s 00:00 [######################################################] 100%
 libyaml-0.1.6-1-x86_64                                             53.0 KiB  0.00B/s 00:00 [######################################################] 100%
 python2-yaml-3.11-1-x86_64                                        127.0 KiB  62.0M/s 00:00 [######################################################] 100%
 apache-libcloud-0.14.1-1-any                                      935.8 KiB  10.9M/s 00:00 [######################################################] 100%
 sshpass-1.05-1-x86_64                                               6.9 KiB  0.00B/s 00:00 [######################################################] 100%
 salt-2014.1.4-1-any                                                 2.1 MiB  12.9M/s 00:00 [######################################################] 100%
(19/19) checking keys in keyring                                                            [######################################################] 100%
(19/19) checking package integrity                                                          [######################################################] 100%
(19/19) loading package files                                                               [######################################################] 100%
(19/19) checking for file conflicts                                                         [######################################################] 100%
(19/19) checking available disk space                                                       [######################################################] 100%
( 1/19) installing python2-crypto                                                           [######################################################] 100%
( 2/19) installing python2-setuptools                                                       [######################################################] 100%
( 3/19) installing python2-markupsafe                                                       [######################################################] 100%
( 4/19) installing python2-jinja                                                            [######################################################] 100%
( 5/19) installing python2-m2crypto                                                         [######################################################] 100%
( 6/19) installing python2-msgpack                                                          [######################################################] 100%
( 7/19) installing python2-psutil                                                           [######################################################] 100%
( 8/19) installing libsodium                                                                [######################################################] 100%
( 9/19) installing zeromq                                                                   [######################################################] 100%
(10/19) installing python2-pyzmq                                                            [######################################################] 100%
(11/19) installing libxslt                                                                  [######################################################] 100%
(12/19) installing python2-lxml                                                             [######################################################] 100%
Optional dependencies for python2-lxml
    python2-beautifulsoup3: support for parsing not well formed HTML
    python-lxml-docs: offline docs
(13/19) installing python2-systemd                                                          [######################################################] 100%
(14/19) installing python2-requests                                                         [######################################################] 100%
Optional dependencies for python2-requests
    python2-ndg-httpsclient: HTTPS requests with SNI support
    python2-grequests: asynchronous requests with gevent
(15/19) installing libyaml                                                                  [######################################################] 100%
(16/19) installing python2-yaml                                                             [######################################################] 100%
==> Note that even though this package uses libyaml library,
==> slower pure python implementation is used by default.
==> See http://pyyaml.org/wiki/PyYAMLDocumentation
(17/19) installing apache-libcloud                                                          [######################################################] 100%
(18/19) installing sshpass                                                                  [######################################################] 100%
(19/19) installing salt                                                                     [######################################################] 100%
Optional dependencies for salt
    dmidecode: decode SMBIOS/DMI tables
[root@www ~]#

 

 

2. Create a folder to store your Salt states:

 

# mkdir -p /srv/salt

 

 

3. Create a few simple files to get started:

# cat top.sls
base:
  '*':
    - yajl
    - ntp
    - ssh

 

# cat yajl.sls
yajl:
  pkg:
    - name: yajl
    - installed

 

# cat ntp.sls
ntp:
  service:
    - name: ntpd
    - running
    - enable: True
    - reload: True
    - watch:
      - pkg: ntp
  pkg:
    - installed

 

 

# cat ssh.sls
ssh:
  service:
    - name: sshd
    - running
    - enable: True
    - reload: True
    - watch:
      - pkg: ssh
  pkg:
    - name: openssh
    - installed

 

 

4. Give it a try:

 

# salt-call --local state.highstate

 

You should see something like this:

 

 

[WARNING ] Although 'lspci' was found in path, the current user cannot execute it. Grains output might not be accurate.
[WARNING ] Although 'lspci' was found in path, the current user cannot execute it. Grains output might not be accurate.
[INFO    ] Loading fresh modules for state activity
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/modules'
[INFO    ] Syncing modules for environment 'base'
[INFO    ] Loading cache from salt://_modules, for base)
[INFO    ] Caching directory '_modules/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/states'
[INFO    ] Syncing states for environment 'base'
[INFO    ] Loading cache from salt://_states, for base)
[INFO    ] Caching directory '_states/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/grains'
[INFO    ] Syncing grains for environment 'base'
[INFO    ] Loading cache from salt://_grains, for base)
[INFO    ] Caching directory '_grains/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/renderers'
[INFO    ] Syncing renderers for environment 'base'
[INFO    ] Loading cache from salt://_renderers, for base)
[INFO    ] Caching directory '_renderers/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/returners'
[INFO    ] Syncing returners for environment 'base'
[INFO    ] Loading cache from salt://_returners, for base)
[INFO    ] Caching directory '_returners/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/outputters'
[INFO    ] Syncing outputters for environment 'base'
[INFO    ] Loading cache from salt://_outputters, for base)
[INFO    ] Caching directory '_outputters/' for environment 'base'
[INFO    ] Loading fresh modules for state activity
[INFO    ] Running state [yajl] at time 11:58:06.699941
[INFO    ] Executing state pkg.installed for yajl
[INFO    ] Executing command 'pacman -Q' in directory '/root'
[INFO    ] Package yajl is already installed
[INFO    ] Completed state [yajl] at time 11:58:06.736884
[INFO    ] Running state [ntp] at time 11:58:06.737394
[INFO    ] Executing state pkg.installed for ntp
[INFO    ] Package ntp is already installed
[INFO    ] Completed state [ntp] at time 11:58:06.738743
[INFO    ] Running state [ntpd] at time 11:58:06.739000
[INFO    ] Executing state service.running for ntpd
[INFO    ] Executing command 'systemctl --full list-unit-files | col -b' in directory '/root'
[INFO    ] stdout: UNIT FILE                   STATE
proc-sys-fs-binfmt_misc.automount       static
org.freedesktop.hostname1.busname       static
org.freedesktop.locale1.busname           static
org.freedesktop.login1.busname           static
org.freedesktop.machine1.busname       static
org.freedesktop.timedate1.busname       static
dev-hugepages.mount               static
dev-mqueue.mount               static
proc-sys-fs-binfmt_misc.mount           static
sys-fs-fuse-connections.mount           static
sys-kernel-config.mount               static
sys-kernel-debug.mount               static
tmp.mount                   static
systemd-ask-password-console.path       static
systemd-ask-password-wall.path           static
session-368.scope               static
session-415.scope               static
session-785.scope               static
session-787.scope               static
autovt@.service                   disabled
blk-availability.service           disabled
console-getty.service               disabled
console-shell.service               disabled
container-getty@.service           static
cronie.service                   disabled
dbus-org.freedesktop.hostname1.service       static
dbus-org.freedesktop.locale1.service       static
dbus-org.freedesktop.login1.service       static
dbus-org.freedesktop.machine1.service       static
dbus-org.freedesktop.timedate1.service       static
dbus.service                   static
debug-shell.service               disabled
dhcpcd.service                   disabled
dhcpcd@.service                   disabled
dm-event.service               disabled
emergency.service               static
ftpd.service                   disabled
getty@.service                   enabled
git-daemon@.service               static
gpm.service                   disabled
haveged.service                   disabled
httpd.service                   enabled
initrd-cleanup.service               static
initrd-parse-etc.service           static
initrd-switch-root.service           static
initrd-udevadm-cleanup-db.service       static
ip6tables.service               disabled
iptables.service               disabled
kmod-static-nodes.service           static
krb5-kadmind.service               disabled
krb5-kdc.service               disabled
krb5-kpropd.service               disabled
krb5-kpropd@.service               static
logrotate.service               static
lvm2-lvmetad.service               disabled
lvm2-monitor.service               disabled
lvm2-pvscan@.service               static
man-db.service                   static
mdadm.service                   disabled
mdmon@.service                   static
mkinitcpio-generate-shutdown-ramfs.service static
mysqld.service                   enabled
neo4j.service                   disabled
netctl-auto@.service               disabled
netctl-ifplugd@.service               disabled
netctl-sleep.service               disabled
netctl.service                   disabled
netctl@.service                   static
netctl@ethernet\x2dstatic.service       enabled
nginx.service                   enabled
nscd.service                   disabled
ntpd.service                   enabled
ntpdate.service                   disabled
pkgstats.service               static
postgresql.service               enabled
ppp@.service                   disabled
quotaon.service                   static
redis.service                   enabled
rescue.service                   static
rlogin@.service                   static
rsh@.service                   static
rsyncd.service                   disabled
rsyncd@.service                   static
salt-master.service               disabled
salt-minion.service               disabled
salt-syndic.service               disabled
serial-getty@.service               disabled
shadow.service                   static
sshd.service                   enabled
sshd@.service                   static
sshdgenkeys.service               enabled
systemd-ask-password-console.service       static
systemd-ask-password-wall.service       static
systemd-backlight@.service           static
systemd-binfmt.service               static
systemd-fsck-root.service           static
systemd-fsck@.service               static
systemd-halt.service               static
systemd-hibernate.service           static
systemd-hostnamed.service           static
systemd-hybrid-sleep.service           static
systemd-initctl.service               static
systemd-journal-flush.service           static
systemd-journal-gatewayd.service       static
systemd-journald.service           static
systemd-kexec.service               static
systemd-localed.service               static
systemd-logind.service               static
systemd-machined.service           static
systemd-modules-load.service           static
systemd-networkd-wait-online.service       enabled
systemd-networkd.service           enabled
systemd-nspawn@.service               disabled
systemd-poweroff.service           static
systemd-quotacheck.service           static
systemd-random-seed.service           static
systemd-readahead-collect.service       disabled
systemd-readahead-done.service           static
systemd-readahead-drop.service           disabled
systemd-readahead-replay.service       disabled
systemd-reboot.service               static
systemd-remount-fs.service           static
systemd-resolved.service           disabled
systemd-rfkill@.service               static
systemd-shutdownd.service           static
systemd-suspend.service               static
systemd-sysctl.service               static
systemd-timedated.service           static
systemd-timesyncd.service           disabled
systemd-tmpfiles-clean.service           static
systemd-tmpfiles-setup-dev.service       static
systemd-tmpfiles-setup.service           static
systemd-udev-settle.service           static
systemd-udev-trigger.service           static
systemd-udevd.service               static
systemd-update-utmp-runlevel.service       static
systemd-update-utmp.service           static
systemd-user-sessions.service           static
systemd-vconsole-setup.service           static
talk.service                   static
telnet@.service                   static
user@.service                   static
uuidd.service                   static
-.slice                       static
machine.slice                   static
system.slice                   static
user.slice                   static
dbus.socket                   static
dm-event.socket                   static
git-daemon.socket               disabled
krb5-kpropd.socket               disabled
lvm2-lvmetad.socket               static
rlogin.socket                   disabled
rsh.socket                   disabled
rsyncd.socket                   disabled
sshd.socket                   disabled
syslog.socket                   static
systemd-initctl.socket               static
systemd-journal-gatewayd.socket           disabled
systemd-journald.socket               static
systemd-shutdownd.socket           static
systemd-udevd-control.socket           static
systemd-udevd-kernel.socket           static
talk.socket                   disabled
telnet.socket                   disabled
uuidd.socket                   disabled
basic.target                   static
bluetooth.target               static
busnames.target                   static
cryptsetup.target               static
ctrl-alt-del.target               disabled
default.target                   static
emergency.target               static
final.target                   static
getty.target                   static
graphical.target               static
halt.target                   disabled
hibernate.target               static
hybrid-sleep.target               static
initrd-fs.target               static
initrd-root-fs.target               static
initrd-switch-root.target           static
initrd.target                   static
kexec.target                   disabled
local-fs-pre.target               static
local-fs.target                   static
multi-user.target               static
network-online.target               static
network.target                   static
nss-lookup.target               static
nss-user-lookup.target               static
paths.target                   static
poweroff.target                   disabled
printer.target                   static
reboot.target                   disabled
remote-fs-pre.target               static
remote-fs.target               enabled
rescue.target                   disabled
rpcbind.target                   static
shutdown.target                   static
sigpwr.target                   static
sleep.target                   static
slices.target                   static
smartcard.target               static
sockets.target                   static
sound.target                   static
suspend.target                   static
swap.target                   static
sysinit.target                   static
system-update.target               static
time-sync.target               static
timers.target                   static
umount.target                   static
logrotate.timer                   static
man-db.timer                   static
pkgstats.timer                   static
shadow.timer                   static
systemd-readahead-done.timer           static
systemd-tmpfiles-clean.timer           static

219 unit files listed.
[INFO    ] Executing command 'systemctl --full list-unit-files | col -b' in directory '/root'
[INFO    ] stdout: UNIT FILE                   STATE
proc-sys-fs-binfmt_misc.automount       static
org.freedesktop.hostname1.busname       static
org.freedesktop.locale1.busname           static
org.freedesktop.login1.busname           static
org.freedesktop.machine1.busname       static
org.freedesktop.timedate1.busname       static
dev-hugepages.mount               static
dev-mqueue.mount               static
proc-sys-fs-binfmt_misc.mount           static
sys-fs-fuse-connections.mount           static
sys-kernel-config.mount               static
sys-kernel-debug.mount               static
tmp.mount                   static
systemd-ask-password-console.path       static
systemd-ask-password-wall.path           static
session-368.scope               static
session-415.scope               static
session-785.scope               static
session-787.scope               static
autovt@.service                   disabled
blk-availability.service           disabled
console-getty.service               disabled
console-shell.service               disabled
container-getty@.service           static
cronie.service                   disabled
dbus-org.freedesktop.hostname1.service       static
dbus-org.freedesktop.locale1.service       static
dbus-org.freedesktop.login1.service       static
dbus-org.freedesktop.machine1.service       static
dbus-org.freedesktop.timedate1.service       static
dbus.service                   static
debug-shell.service               disabled
dhcpcd.service                   disabled
dhcpcd@.service                   disabled
dm-event.service               disabled
emergency.service               static
ftpd.service                   disabled
getty@.service                   enabled
git-daemon@.service               static
gpm.service                   disabled
haveged.service                   disabled
httpd.service                   enabled
initrd-cleanup.service               static
initrd-parse-etc.service           static
initrd-switch-root.service           static
initrd-udevadm-cleanup-db.service       static
ip6tables.service               disabled
iptables.service               disabled
kmod-static-nodes.service           static
krb5-kadmind.service               disabled
krb5-kdc.service               disabled
krb5-kpropd.service               disabled
krb5-kpropd@.service               static
logrotate.service               static
lvm2-lvmetad.service               disabled
lvm2-monitor.service               disabled
lvm2-pvscan@.service               static
man-db.service                   static
mdadm.service                   disabled
mdmon@.service                   static
mkinitcpio-generate-shutdown-ramfs.service static
mysqld.service                   enabled
neo4j.service                   disabled
netctl-auto@.service               disabled
netctl-ifplugd@.service               disabled
netctl-sleep.service               disabled
netctl.service                   disabled
netctl@.service                   static
netctl@ethernet\x2dstatic.service       enabled
nginx.service                   enabled
nscd.service                   disabled
ntpd.service                   enabled
ntpdate.service                   disabled
pkgstats.service               static
postgresql.service               enabled
ppp@.service                   disabled
quotaon.service                   static
redis.service                   enabled
rescue.service                   static
rlogin@.service                   static
rsh@.service                   static
rsyncd.service                   disabled
rsyncd@.service                   static
salt-master.service               disabled
salt-minion.service               disabled
salt-syndic.service               disabled
serial-getty@.service               disabled
shadow.service                   static
sshd.service                   enabled
sshd@.service                   static
sshdgenkeys.service               enabled
systemd-ask-password-console.service       static
systemd-ask-password-wall.service       static
systemd-backlight@.service           static
systemd-binfmt.service               static
systemd-fsck-root.service           static
systemd-fsck@.service               static
systemd-halt.service               static
systemd-hibernate.service           static
systemd-hostnamed.service           static
systemd-hybrid-sleep.service           static
systemd-initctl.service               static
systemd-journal-flush.service           static
systemd-journal-gatewayd.service       static
systemd-journald.service           static
systemd-kexec.service               static
systemd-localed.service               static
systemd-logind.service               static
systemd-machined.service           static
systemd-modules-load.service           static
systemd-networkd-wait-online.service       enabled
systemd-networkd.service           enabled
systemd-nspawn@.service               disabled
systemd-poweroff.service           static
systemd-quotacheck.service           static
systemd-random-seed.service           static
systemd-readahead-collect.service       disabled
systemd-readahead-done.service           static
systemd-readahead-drop.service           disabled
systemd-readahead-replay.service       disabled
systemd-reboot.service               static
systemd-remount-fs.service           static
systemd-resolved.service           disabled
systemd-rfkill@.service               static
systemd-shutdownd.service           static
systemd-suspend.service               static
systemd-sysctl.service               static
systemd-timedated.service           static
systemd-timesyncd.service           disabled
systemd-tmpfiles-clean.service           static
systemd-tmpfiles-setup-dev.service       static
systemd-tmpfiles-setup.service           static
systemd-udev-settle.service           static
systemd-udev-trigger.service           static
systemd-udevd.service               static
systemd-update-utmp-runlevel.service       static
systemd-update-utmp.service           static
systemd-user-sessions.service           static
systemd-vconsole-setup.service           static
talk.service                   static
telnet@.service                   static
user@.service                   static
uuidd.service                   static
-.slice                       static
machine.slice                   static
system.slice                   static
user.slice                   static
dbus.socket                   static
dm-event.socket                   static
git-daemon.socket               disabled
krb5-kpropd.socket               disabled
lvm2-lvmetad.socket               static
rlogin.socket                   disabled
rsh.socket                   disabled
rsyncd.socket                   disabled
sshd.socket                   disabled
syslog.socket                   static
systemd-initctl.socket               static
systemd-journal-gatewayd.socket           disabled
systemd-journald.socket               static
systemd-shutdownd.socket           static
systemd-udevd-control.socket           static
systemd-udevd-kernel.socket           static
talk.socket                   disabled
telnet.socket                   disabled
uuidd.socket                   disabled
basic.target                   static
bluetooth.target               static
busnames.target                   static
cryptsetup.target               static
ctrl-alt-del.target               disabled
default.target                   static
emergency.target               static
final.target                   static
getty.target                   static
graphical.target               static
halt.target                   disabled
hibernate.target               static
hybrid-sleep.target               static
initrd-fs.target               static
initrd-root-fs.target               static
initrd-switch-root.target           static
initrd.target                   static
kexec.target                   disabled
local-fs-pre.target               static
local-fs.target                   static
multi-user.target               static
network-online.target               static
network.target                   static
nss-lookup.target               static
nss-user-lookup.target               static
paths.target                   static
poweroff.target                   disabled
printer.target                   static
reboot.target                   disabled
remote-fs-pre.target               static
remote-fs.target               enabled
rescue.target                   disabled
rpcbind.target                   static
shutdown.target                   static
sigpwr.target                   static
sleep.target                   static
slices.target                   static
smartcard.target               static
sockets.target                   static
sound.target                   static
suspend.target                   static
swap.target                   static
sysinit.target                   static
system-update.target               static
time-sync.target               static
timers.target                   static
umount.target                   static
logrotate.timer                   static
man-db.timer                   static
pkgstats.timer                   static
shadow.timer                   static
systemd-readahead-done.timer           static
systemd-tmpfiles-clean.timer           static

219 unit files listed.
[INFO    ] Executing command 'systemctl status ntpd.service' in directory '/root'
[INFO    ] output: * ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled)
   Active: active (running) since Thu 2014-04-17 13:56:27 PDT; 1 months 23 days ago
 Main PID: 2340 (ntpd)
   CGroup: /system.slice/ntpd.service
           `-2340 /usr/bin/ntpd -g -u ntp:ntp -p /run/ntpd.pid

Apr 17 13:56:27 www.in.sert.co.in ntpd[2340]: Listen and drop on 1 v6wildcard :: UDP 123
Apr 17 13:56:27 www.in.sert.co.in ntpd[2340]: Listen normally on 2 lo 127.0.0.1 UDP 123
Apr 17 13:56:27 www.in.sert.co.in ntpd[2340]: Listen normally on 3 eth0 173.230.149.180 UDP 123
Apr 17 13:56:27 www.in.sert.co.in ntpd[2340]: Listen normally on 4 lo ::1 UDP 123
Apr 17 13:56:27 www.in.sert.co.in ntpd[2340]: Listen normally on 5 eth0 2600:3c01::f03c:91ff:fe70:fbd0 UDP 123
Apr 17 13:56:27 www.in.sert.co.in ntpd[2340]: Listen normally on 6 eth0 fe80::f03c:91ff:fe70:fbd0 UDP 123
Apr 17 13:56:27 www.in.sert.co.in ntpd[2340]: Listen normally on 7 eth0 2600:3c01:e000:87::2 UDP 123
Apr 17 13:56:27 www.in.sert.co.in ntpd[2340]: Listen normally on 8 eth0 2600:3c01:e000:87::1 UDP 123
Apr 17 13:56:27 www.in.sert.co.in systemd[1]: Started Network Time Service.
Apr 17 13:56:27 www.in.sert.co.in ntpd[2340]: peers refreshed
Apr 17 13:56:27 www.in.sert.co.in ntpd[2340]: Listening on routing socket on fd #25 for interface updates
[INFO    ] Executing command 'systemctl is-active ntpd.service' in directory '/root'
[INFO    ] output: active
[INFO    ] Executing command 'systemctl --full list-unit-files | col -b' in directory '/root'
[INFO    ] stdout: UNIT FILE                   STATE
proc-sys-fs-binfmt_misc.automount       static
org.freedesktop.hostname1.busname       static
org.freedesktop.locale1.busname           static
org.freedesktop.login1.busname           static
org.freedesktop.machine1.busname       static
org.freedesktop.timedate1.busname       static
dev-hugepages.mount               static
dev-mqueue.mount               static
proc-sys-fs-binfmt_misc.mount           static
sys-fs-fuse-connections.mount           static
sys-kernel-config.mount               static
sys-kernel-debug.mount               static
tmp.mount                   static
systemd-ask-password-console.path       static
systemd-ask-password-wall.path           static
session-368.scope               static
session-415.scope               static
session-785.scope               static
session-787.scope               static
autovt@.service                   disabled
blk-availability.service           disabled
console-getty.service               disabled
console-shell.service               disabled
container-getty@.service           static
cronie.service                   disabled
dbus-org.freedesktop.hostname1.service       static
dbus-org.freedesktop.locale1.service       static
dbus-org.freedesktop.login1.service       static
dbus-org.freedesktop.machine1.service       static
dbus-org.freedesktop.timedate1.service       static
dbus.service                   static
debug-shell.service               disabled
dhcpcd.service                   disabled
dhcpcd@.service                   disabled
dm-event.service               disabled
emergency.service               static
ftpd.service                   disabled
getty@.service                   enabled
git-daemon@.service               static
gpm.service                   disabled
haveged.service                   disabled
httpd.service                   enabled
initrd-cleanup.service               static
initrd-parse-etc.service           static
initrd-switch-root.service           static
initrd-udevadm-cleanup-db.service       static
ip6tables.service               disabled
iptables.service               disabled
kmod-static-nodes.service           static
krb5-kadmind.service               disabled
krb5-kdc.service               disabled
krb5-kpropd.service               disabled
krb5-kpropd@.service               static
logrotate.service               static
lvm2-lvmetad.service               disabled
lvm2-monitor.service               disabled
lvm2-pvscan@.service               static
man-db.service                   static
mdadm.service                   disabled
mdmon@.service                   static
mkinitcpio-generate-shutdown-ramfs.service static
mysqld.service                   enabled
neo4j.service                   disabled
netctl-auto@.service               disabled
netctl-ifplugd@.service               disabled
netctl-sleep.service               disabled
netctl.service                   disabled
netctl@.service                   static
netctl@ethernet\x2dstatic.service       enabled
nginx.service                   enabled
nscd.service                   disabled
ntpd.service                   enabled
ntpdate.service                   disabled
pkgstats.service               static
postgresql.service               enabled
ppp@.service                   disabled
quotaon.service                   static
redis.service                   enabled
rescue.service                   static
rlogin@.service                   static
rsh@.service                   static
rsyncd.service                   disabled
rsyncd@.service                   static
salt-master.service               disabled
salt-minion.service               disabled
salt-syndic.service               disabled
serial-getty@.service               disabled
shadow.service                   static
sshd.service                   enabled
sshd@.service                   static
sshdgenkeys.service               enabled
systemd-ask-password-console.service       static
systemd-ask-password-wall.service       static
systemd-backlight@.service           static
systemd-binfmt.service               static
systemd-fsck-root.service           static
systemd-fsck@.service               static
systemd-halt.service               static
systemd-hibernate.service           static
systemd-hostnamed.service           static
systemd-hybrid-sleep.service           static
systemd-initctl.service               static
systemd-journal-flush.service           static
systemd-journal-gatewayd.service       static
systemd-journald.service           static
systemd-kexec.service               static
systemd-localed.service               static
systemd-logind.service               static
systemd-machined.service           static
systemd-modules-load.service           static
systemd-networkd-wait-online.service       enabled
systemd-networkd.service           enabled
systemd-nspawn@.service               disabled
systemd-poweroff.service           static
systemd-quotacheck.service           static
systemd-random-seed.service           static
systemd-readahead-collect.service       disabled
systemd-readahead-done.service           static
systemd-readahead-drop.service           disabled
systemd-readahead-replay.service       disabled
systemd-reboot.service               static
systemd-remount-fs.service           static
systemd-resolved.service           disabled
systemd-rfkill@.service               static
systemd-shutdownd.service           static
systemd-suspend.service               static
systemd-sysctl.service               static
systemd-timedated.service           static
systemd-timesyncd.service           disabled
systemd-tmpfiles-clean.service           static
systemd-tmpfiles-setup-dev.service       static
systemd-tmpfiles-setup.service           static
systemd-udev-settle.service           static
systemd-udev-trigger.service           static
systemd-udevd.service               static
systemd-update-utmp-runlevel.service       static
systemd-update-utmp.service           static
systemd-user-sessions.service           static
systemd-vconsole-setup.service           static
talk.service                   static
telnet@.service                   static
user@.service                   static
uuidd.service                   static
-.slice                       static
machine.slice                   static
system.slice                   static
user.slice                   static
dbus.socket                   static
dm-event.socket                   static
git-daemon.socket               disabled
krb5-kpropd.socket               disabled
lvm2-lvmetad.socket               static
rlogin.socket                   disabled
rsh.socket                   disabled
rsyncd.socket                   disabled
sshd.socket                   disabled
syslog.socket                   static
systemd-initctl.socket               static
systemd-journal-gatewayd.socket           disabled
systemd-journald.socket               static
systemd-shutdownd.socket           static
systemd-udevd-control.socket           static
systemd-udevd-kernel.socket           static
talk.socket                   disabled
telnet.socket                   disabled
uuidd.socket                   disabled
basic.target                   static
bluetooth.target               static
busnames.target                   static
cryptsetup.target               static
ctrl-alt-del.target               disabled
default.target                   static
emergency.target               static
final.target                   static
getty.target                   static
graphical.target               static
halt.target                   disabled
hibernate.target               static
hybrid-sleep.target               static
initrd-fs.target               static
initrd-root-fs.target               static
initrd-switch-root.target           static
initrd.target                   static
kexec.target                   disabled
local-fs-pre.target               static
local-fs.target                   static
multi-user.target               static
network-online.target               static
network.target                   static
nss-lookup.target               static
nss-user-lookup.target               static
paths.target                   static
poweroff.target                   disabled
printer.target                   static
reboot.target                   disabled
remote-fs-pre.target               static
remote-fs.target               enabled
rescue.target                   disabled
rpcbind.target                   static
shutdown.target                   static
sigpwr.target                   static
sleep.target                   static
slices.target                   static
smartcard.target               static
sockets.target                   static
sound.target                   static
suspend.target                   static
swap.target                   static
sysinit.target                   static
system-update.target               static
time-sync.target               static
timers.target                   static
umount.target                   static
logrotate.timer                   static
man-db.timer                   static
pkgstats.timer                   static
shadow.timer                   static
systemd-readahead-done.timer           static
systemd-tmpfiles-clean.timer           static

219 unit files listed.
[INFO    ] Executing command 'systemctl is-enabled ntpd.service' in directory '/root'
[INFO    ] output: enabled
[INFO    ] Service ntpd is already enabled, and is in the desired state
[INFO    ] Completed state [ntpd] at time 11:58:07.117368
[INFO    ] Running state [openssh] at time 11:58:07.118257
[INFO    ] Executing state pkg.installed for openssh
[INFO    ] Package openssh is already installed
[INFO    ] Completed state [openssh] at time 11:58:07.120638
[INFO    ] Running state [sshd] at time 11:58:07.121005
[INFO    ] Executing state service.running for sshd
[INFO    ] Executing command 'systemctl --full list-unit-files | col -b' in directory '/root'
[INFO    ] stdout: UNIT FILE                   STATE
proc-sys-fs-binfmt_misc.automount       static
org.freedesktop.hostname1.busname       static
org.freedesktop.locale1.busname           static
org.freedesktop.login1.busname           static
org.freedesktop.machine1.busname       static
org.freedesktop.timedate1.busname       static
dev-hugepages.mount               static
dev-mqueue.mount               static
proc-sys-fs-binfmt_misc.mount           static
sys-fs-fuse-connections.mount           static
sys-kernel-config.mount               static
sys-kernel-debug.mount               static
tmp.mount                   static
systemd-ask-password-console.path       static
systemd-ask-password-wall.path           static
session-368.scope               static
session-415.scope               static
session-785.scope               static
session-787.scope               static
autovt@.service                   disabled
blk-availability.service           disabled
console-getty.service               disabled
console-shell.service               disabled
container-getty@.service           static
cronie.service                   disabled
dbus-org.freedesktop.hostname1.service       static
dbus-org.freedesktop.locale1.service       static
dbus-org.freedesktop.login1.service       static
dbus-org.freedesktop.machine1.service       static
dbus-org.freedesktop.timedate1.service       static
dbus.service                   static
debug-shell.service               disabled
dhcpcd.service                   disabled
dhcpcd@.service                   disabled
dm-event.service               disabled
emergency.service               static
ftpd.service                   disabled
getty@.service                   enabled
git-daemon@.service               static
gpm.service                   disabled
haveged.service                   disabled
httpd.service                   enabled
initrd-cleanup.service               static
initrd-parse-etc.service           static
initrd-switch-root.service           static
initrd-udevadm-cleanup-db.service       static
ip6tables.service               disabled
iptables.service               disabled
kmod-static-nodes.service           static
krb5-kadmind.service               disabled
krb5-kdc.service               disabled
krb5-kpropd.service               disabled
krb5-kpropd@.service               static
logrotate.service               static
lvm2-lvmetad.service               disabled
lvm2-monitor.service               disabled
lvm2-pvscan@.service               static
man-db.service                   static
mdadm.service                   disabled
mdmon@.service                   static
mkinitcpio-generate-shutdown-ramfs.service static
mysqld.service                   enabled
neo4j.service                   disabled
netctl-auto@.service               disabled
netctl-ifplugd@.service               disabled
netctl-sleep.service               disabled
netctl.service                   disabled
netctl@.service                   static
netctl@ethernet\x2dstatic.service       enabled
nginx.service                   enabled
nscd.service                   disabled
ntpd.service                   enabled
ntpdate.service                   disabled
pkgstats.service               static
postgresql.service               enabled
ppp@.service                   disabled
quotaon.service                   static
redis.service                   enabled
rescue.service                   static
rlogin@.service                   static
rsh@.service                   static
rsyncd.service                   disabled
rsyncd@.service                   static
salt-master.service               disabled
salt-minion.service               disabled
salt-syndic.service               disabled
serial-getty@.service               disabled
shadow.service                   static
sshd.service                   enabled
sshd@.service                   static
sshdgenkeys.service               enabled
systemd-ask-password-console.service       static
systemd-ask-password-wall.service       static
systemd-backlight@.service           static
systemd-binfmt.service               static
systemd-fsck-root.service           static
systemd-fsck@.service               static
systemd-halt.service               static
systemd-hibernate.service           static
systemd-hostnamed.service           static
systemd-hybrid-sleep.service           static
systemd-initctl.service               static
systemd-journal-flush.service           static
systemd-journal-gatewayd.service       static
systemd-journald.service           static
systemd-kexec.service               static
systemd-localed.service               static
systemd-logind.service               static
systemd-machined.service           static
systemd-modules-load.service           static
systemd-networkd-wait-online.service       enabled
systemd-networkd.service           enabled
systemd-nspawn@.service               disabled
systemd-poweroff.service           static
systemd-quotacheck.service           static
systemd-random-seed.service           static
systemd-readahead-collect.service       disabled
systemd-readahead-done.service           static
systemd-readahead-drop.service           disabled
systemd-readahead-replay.service       disabled
systemd-reboot.service               static
systemd-remount-fs.service           static
systemd-resolved.service           disabled
systemd-rfkill@.service               static
systemd-shutdownd.service           static
systemd-suspend.service               static
systemd-sysctl.service               static
systemd-timedated.service           static
systemd-timesyncd.service           disabled
systemd-tmpfiles-clean.service           static
systemd-tmpfiles-setup-dev.service       static
systemd-tmpfiles-setup.service           static
systemd-udev-settle.service           static
systemd-udev-trigger.service           static
systemd-udevd.service               static
systemd-update-utmp-runlevel.service       static
systemd-update-utmp.service           static
systemd-user-sessions.service           static
systemd-vconsole-setup.service           static
talk.service                   static
telnet@.service                   static
user@.service                   static
uuidd.service                   static
-.slice                       static
machine.slice                   static
system.slice                   static
user.slice                   static
dbus.socket                   static
dm-event.socket                   static
git-daemon.socket               disabled
krb5-kpropd.socket               disabled
lvm2-lvmetad.socket               static
rlogin.socket                   disabled
rsh.socket                   disabled
rsyncd.socket                   disabled
sshd.socket                   disabled
syslog.socket                   static
systemd-initctl.socket               static
systemd-journal-gatewayd.socket           disabled
systemd-journald.socket               static
systemd-shutdownd.socket           static
systemd-udevd-control.socket           static
systemd-udevd-kernel.socket           static
talk.socket                   disabled
telnet.socket                   disabled
uuidd.socket                   disabled
basic.target                   static
bluetooth.target               static
busnames.target                   static
cryptsetup.target               static
ctrl-alt-del.target               disabled
default.target                   static
emergency.target               static
final.target                   static
getty.target                   static
graphical.target               static
halt.target                   disabled
hibernate.target               static
hybrid-sleep.target               static
initrd-fs.target               static
initrd-root-fs.target               static
initrd-switch-root.target           static
initrd.target                   static
kexec.target                   disabled
local-fs-pre.target               static
local-fs.target                   static
multi-user.target               static
network-online.target               static
network.target                   static
nss-lookup.target               static
nss-user-lookup.target               static
paths.target                   static
poweroff.target                   disabled
printer.target                   static
reboot.target                   disabled
remote-fs-pre.target               static
remote-fs.target               enabled
rescue.target                   disabled
rpcbind.target                   static
shutdown.target                   static
sigpwr.target                   static
sleep.target                   static
slices.target                   static
smartcard.target               static
sockets.target                   static
sound.target                   static
suspend.target                   static
swap.target                   static
sysinit.target                   static
system-update.target               static
time-sync.target               static
timers.target                   static
umount.target                   static
logrotate.timer                   static
man-db.timer                   static
pkgstats.timer                   static
shadow.timer                   static
systemd-readahead-done.timer           static
systemd-tmpfiles-clean.timer           static

219 unit files listed.
[INFO    ] Executing command 'systemctl --full list-unit-files | col -b' in directory '/root'
[INFO    ] stdout: UNIT FILE                   STATE
proc-sys-fs-binfmt_misc.automount       static
org.freedesktop.hostname1.busname       static
org.freedesktop.locale1.busname           static
org.freedesktop.login1.busname           static
org.freedesktop.machine1.busname       static
org.freedesktop.timedate1.busname       static
dev-hugepages.mount               static
dev-mqueue.mount               static
proc-sys-fs-binfmt_misc.mount           static
sys-fs-fuse-connections.mount           static
sys-kernel-config.mount               static
sys-kernel-debug.mount               static
tmp.mount                   static
systemd-ask-password-console.path       static
systemd-ask-password-wall.path           static
session-368.scope               static
session-415.scope               static
session-785.scope               static
session-787.scope               static
autovt@.service                   disabled
blk-availability.service           disabled
console-getty.service               disabled
console-shell.service               disabled
container-getty@.service           static
cronie.service                   disabled
dbus-org.freedesktop.hostname1.service       static
dbus-org.freedesktop.locale1.service       static
dbus-org.freedesktop.login1.service       static
dbus-org.freedesktop.machine1.service       static
dbus-org.freedesktop.timedate1.service       static
dbus.service                   static
debug-shell.service               disabled
dhcpcd.service                   disabled
dhcpcd@.service                   disabled
dm-event.service               disabled
emergency.service               static
ftpd.service                   disabled
getty@.service                   enabled
git-daemon@.service               static
gpm.service                   disabled
haveged.service                   disabled
httpd.service                   enabled
initrd-cleanup.service               static
initrd-parse-etc.service           static
initrd-switch-root.service           static
initrd-udevadm-cleanup-db.service       static
ip6tables.service               disabled
iptables.service               disabled
kmod-static-nodes.service           static
krb5-kadmind.service               disabled
krb5-kdc.service               disabled
krb5-kpropd.service               disabled
krb5-kpropd@.service               static
logrotate.service               static
lvm2-lvmetad.service               disabled
lvm2-monitor.service               disabled
lvm2-pvscan@.service               static
man-db.service                   static
mdadm.service                   disabled
mdmon@.service                   static
mkinitcpio-generate-shutdown-ramfs.service static
mysqld.service                   enabled
neo4j.service                   disabled
netctl-auto@.service               disabled
netctl-ifplugd@.service               disabled
netctl-sleep.service               disabled
netctl.service                   disabled
netctl@.service                   static
netctl@ethernet\x2dstatic.service       enabled
nginx.service                   enabled
nscd.service                   disabled
ntpd.service                   enabled
ntpdate.service                   disabled
pkgstats.service               static
postgresql.service               enabled
ppp@.service                   disabled
quotaon.service                   static
redis.service                   enabled
rescue.service                   static
rlogin@.service                   static
rsh@.service                   static
rsyncd.service                   disabled
rsyncd@.service                   static
salt-master.service               disabled
salt-minion.service               disabled
salt-syndic.service               disabled
serial-getty@.service               disabled
shadow.service                   static
sshd.service                   enabled
sshd@.service                   static
sshdgenkeys.service               enabled
systemd-ask-password-console.service       static
systemd-ask-password-wall.service       static
systemd-backlight@.service           static
systemd-binfmt.service               static
systemd-fsck-root.service           static
systemd-fsck@.service               static
systemd-halt.service               static
systemd-hibernate.service           static
systemd-hostnamed.service           static
systemd-hybrid-sleep.service           static
systemd-initctl.service               static
systemd-journal-flush.service           static
systemd-journal-gatewayd.service       static
systemd-journald.service           static
systemd-kexec.service               static
systemd-localed.service               static
systemd-logind.service               static
systemd-machined.service           static
systemd-modules-load.service           static
systemd-networkd-wait-online.service       enabled
systemd-networkd.service           enabled
systemd-nspawn@.service               disabled
systemd-poweroff.service           static
systemd-quotacheck.service           static
systemd-random-seed.service           static
systemd-readahead-collect.service       disabled
systemd-readahead-done.service           static
systemd-readahead-drop.service           disabled
systemd-readahead-replay.service       disabled
systemd-reboot.service               static
systemd-remount-fs.service           static
systemd-resolved.service           disabled
systemd-rfkill@.service               static
systemd-shutdownd.service           static
systemd-suspend.service               static
systemd-sysctl.service               static
systemd-timedated.service           static
systemd-timesyncd.service           disabled
systemd-tmpfiles-clean.service           static
systemd-tmpfiles-setup-dev.service       static
systemd-tmpfiles-setup.service           static
systemd-udev-settle.service           static
systemd-udev-trigger.service           static
systemd-udevd.service               static
systemd-update-utmp-runlevel.service       static
systemd-update-utmp.service           static
systemd-user-sessions.service           static
systemd-vconsole-setup.service           static
talk.service                   static
telnet@.service                   static
user@.service                   static
uuidd.service                   static
-.slice                       static
machine.slice                   static
system.slice                   static
user.slice                   static
dbus.socket                   static
dm-event.socket                   static
git-daemon.socket               disabled
krb5-kpropd.socket               disabled
lvm2-lvmetad.socket               static
rlogin.socket                   disabled
rsh.socket                   disabled
rsyncd.socket                   disabled
sshd.socket                   disabled
syslog.socket                   static
systemd-initctl.socket               static
systemd-journal-gatewayd.socket           disabled
systemd-journald.socket               static
systemd-shutdownd.socket           static
systemd-udevd-control.socket           static
systemd-udevd-kernel.socket           static
talk.socket                   disabled
telnet.socket                   disabled
uuidd.socket                   disabled
basic.target                   static
bluetooth.target               static
busnames.target                   static
cryptsetup.target               static
ctrl-alt-del.target               disabled
default.target                   static
emergency.target               static
final.target                   static
getty.target                   static
graphical.target               static
halt.target                   disabled
hibernate.target               static
hybrid-sleep.target               static
initrd-fs.target               static
initrd-root-fs.target               static
initrd-switch-root.target           static
initrd.target                   static
kexec.target                   disabled
local-fs-pre.target               static
local-fs.target                   static
multi-user.target               static
network-online.target               static
network.target                   static
nss-lookup.target               static
nss-user-lookup.target               static
paths.target                   static
poweroff.target                   disabled
printer.target                   static
reboot.target                   disabled
remote-fs-pre.target               static
remote-fs.target               enabled
rescue.target                   disabled
rpcbind.target                   static
shutdown.target                   static
sigpwr.target                   static
sleep.target                   static
slices.target                   static
smartcard.target               static
sockets.target                   static
sound.target                   static
suspend.target                   static
swap.target                   static
sysinit.target                   static
system-update.target               static
time-sync.target               static
timers.target                   static
umount.target                   static
logrotate.timer                   static
man-db.timer                   static
pkgstats.timer                   static
shadow.timer                   static
systemd-readahead-done.timer           static
systemd-tmpfiles-clean.timer           static

219 unit files listed.
[INFO    ] Executing command 'systemctl status sshd.service' in directory '/root'
[INFO    ] output: * sshd.service - OpenSSH Daemon
   Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled)
   Active: active (running) since Thu 2014-04-17 13:56:27 PDT; 1 months 23 days ago
 Main PID: 2335 (sshd)
   CGroup: /system.slice/sshd.service
           `-2335 /usr/bin/sshd -D

Jun 10 10:46:44 www.in.sert.co.in sshd[10088]: Failed password for httpd from 72.34.113.100 port 8697 ssh2
Jun 10 10:46:49 www.in.sert.co.in sshd[10088]: Accepted password for httpd from 72.34.113.100 port 8697 ssh2
Jun 10 10:46:49 www.in.sert.co.in sshd[10088]: pam_unix(sshd:session): session opened for user httpd by (uid=0)
Jun 10 10:50:15 www.in.sert.co.in sshd[10140]: Accepted password for root from 72.34.113.100 port 6222 ssh2
Jun 10 10:50:15 www.in.sert.co.in sshd[10140]: pam_unix(sshd:session): session opened for user root by (uid=0)
Jun 10 10:51:09 www.in.sert.co.in sshd[10163]: Connection closed by 72.34.113.100 [preauth]
Jun 10 10:51:18 www.in.sert.co.in sshd[10170]: Accepted publickey for root from 72.34.113.100 port 20639 ssh2: RSA 9c:7e:03:28:f9:b8:94:54:de:33:7e:0f:8a:64:b5:a5
Jun 10 10:51:18 www.in.sert.co.in sshd[10170]: pam_unix(sshd:session): session opened for user root by (uid=0)
Jun 10 10:56:40 www.in.sert.co.in sshd[10995]: Accepted publickey for root from 72.34.113.100 port 34042 ssh2: RSA 9c:7e:03:28:f9:b8:94:54:de:33:7e:0f:8a:64:b5:a5
Jun 10 10:56:40 www.in.sert.co.in sshd[10995]: pam_unix(sshd:session): session opened for user root by (uid=0)
[INFO    ] Executing command 'systemctl is-active sshd.service' in directory '/root'
[INFO    ] output: active
[INFO    ] Executing command 'systemctl --full list-unit-files | col -b' in directory '/root'
[INFO    ] stdout: UNIT FILE                   STATE
proc-sys-fs-binfmt_misc.automount       static
org.freedesktop.hostname1.busname       static
org.freedesktop.locale1.busname           static
org.freedesktop.login1.busname           static
org.freedesktop.machine1.busname       static
org.freedesktop.timedate1.busname       static
dev-hugepages.mount               static
dev-mqueue.mount               static
proc-sys-fs-binfmt_misc.mount           static
sys-fs-fuse-connections.mount           static
sys-kernel-config.mount               static
sys-kernel-debug.mount               static
tmp.mount                   static
systemd-ask-password-console.path       static
systemd-ask-password-wall.path           static
session-368.scope               static
session-415.scope               static
session-785.scope               static
session-787.scope               static
autovt@.service                   disabled
blk-availability.service           disabled
console-getty.service               disabled
console-shell.service               disabled
container-getty@.service           static
cronie.service                   disabled
dbus-org.freedesktop.hostname1.service       static
dbus-org.freedesktop.locale1.service       static
dbus-org.freedesktop.login1.service       static
dbus-org.freedesktop.machine1.service       static
dbus-org.freedesktop.timedate1.service       static
dbus.service                   static
debug-shell.service               disabled
dhcpcd.service                   disabled
dhcpcd@.service                   disabled
dm-event.service               disabled
emergency.service               static
ftpd.service                   disabled
getty@.service                   enabled
git-daemon@.service               static
gpm.service                   disabled
haveged.service                   disabled
httpd.service                   enabled
initrd-cleanup.service               static
initrd-parse-etc.service           static
initrd-switch-root.service           static
initrd-udevadm-cleanup-db.service       static
ip6tables.service               disabled
iptables.service               disabled
kmod-static-nodes.service           static
krb5-kadmind.service               disabled
krb5-kdc.service               disabled
krb5-kpropd.service               disabled
krb5-kpropd@.service               static
logrotate.service               static
lvm2-lvmetad.service               disabled
lvm2-monitor.service               disabled
lvm2-pvscan@.service               static
man-db.service                   static
mdadm.service                   disabled
mdmon@.service                   static
mkinitcpio-generate-shutdown-ramfs.service static
mysqld.service                   enabled
neo4j.service                   disabled
netctl-auto@.service               disabled
netctl-ifplugd@.service               disabled
netctl-sleep.service               disabled
netctl.service                   disabled
netctl@.service                   static
netctl@ethernet\x2dstatic.service       enabled
nginx.service                   enabled
nscd.service                   disabled
ntpd.service                   enabled
ntpdate.service                   disabled
pkgstats.service               static
postgresql.service               enabled
ppp@.service                   disabled
quotaon.service                   static
redis.service                   enabled
rescue.service                   static
rlogin@.service                   static
rsh@.service                   static
rsyncd.service                   disabled
rsyncd@.service                   static
salt-master.service               disabled
salt-minion.service               disabled
salt-syndic.service               disabled
serial-getty@.service               disabled
shadow.service                   static
sshd.service                   enabled
sshd@.service                   static
sshdgenkeys.service               enabled
systemd-ask-password-console.service       static
systemd-ask-password-wall.service       static
systemd-backlight@.service           static
systemd-binfmt.service               static
systemd-fsck-root.service           static
systemd-fsck@.service               static
systemd-halt.service               static
systemd-hibernate.service           static
systemd-hostnamed.service           static
systemd-hybrid-sleep.service           static
systemd-initctl.service               static
systemd-journal-flush.service           static
systemd-journal-gatewayd.service       static
systemd-journald.service           static
systemd-kexec.service               static
systemd-localed.service               static
systemd-logind.service               static
systemd-machined.service           static
systemd-modules-load.service           static
systemd-networkd-wait-online.service       enabled
systemd-networkd.service           enabled
systemd-nspawn@.service               disabled
systemd-poweroff.service           static
systemd-quotacheck.service           static
systemd-random-seed.service           static
systemd-readahead-collect.service       disabled
systemd-readahead-done.service           static
systemd-readahead-drop.service           disabled
systemd-readahead-replay.service       disabled
systemd-reboot.service               static
systemd-remount-fs.service           static
systemd-resolved.service           disabled
systemd-rfkill@.service               static
systemd-shutdownd.service           static
systemd-suspend.service               static
systemd-sysctl.service               static
systemd-timedated.service           static
systemd-timesyncd.service           disabled
systemd-tmpfiles-clean.service           static
systemd-tmpfiles-setup-dev.service       static
systemd-tmpfiles-setup.service           static
systemd-udev-settle.service           static
systemd-udev-trigger.service           static
systemd-udevd.service               static
systemd-update-utmp-runlevel.service       static
systemd-update-utmp.service           static
systemd-user-sessions.service           static
systemd-vconsole-setup.service           static
talk.service                   static
telnet@.service                   static
user@.service                   static
uuidd.service                   static
-.slice                       static
machine.slice                   static
system.slice                   static
user.slice                   static
dbus.socket                   static
dm-event.socket                   static
git-daemon.socket               disabled
krb5-kpropd.socket               disabled
lvm2-lvmetad.socket               static
rlogin.socket                   disabled
rsh.socket                   disabled
rsyncd.socket                   disabled
sshd.socket                   disabled
syslog.socket                   static
systemd-initctl.socket               static
systemd-journal-gatewayd.socket           disabled
systemd-journald.socket               static
systemd-shutdownd.socket           static
systemd-udevd-control.socket           static
systemd-udevd-kernel.socket           static
talk.socket                   disabled
telnet.socket                   disabled
uuidd.socket                   disabled
basic.target                   static
bluetooth.target               static
busnames.target                   static
cryptsetup.target               static
ctrl-alt-del.target               disabled
default.target                   static
emergency.target               static
final.target                   static
getty.target                   static
graphical.target               static
halt.target                   disabled
hibernate.target               static
hybrid-sleep.target               static
initrd-fs.target               static
initrd-root-fs.target               static
initrd-switch-root.target           static
initrd.target                   static
kexec.target                   disabled
local-fs-pre.target               static
local-fs.target                   static
multi-user.target               static
network-online.target               static
network.target                   static
nss-lookup.target               static
nss-user-lookup.target               static
paths.target                   static
poweroff.target                   disabled
printer.target                   static
reboot.target                   disabled
remote-fs-pre.target               static
remote-fs.target               enabled
rescue.target                   disabled
rpcbind.target                   static
shutdown.target                   static
sigpwr.target                   static
sleep.target                   static
slices.target                   static
smartcard.target               static
sockets.target                   static
sound.target                   static
suspend.target                   static
swap.target                   static
sysinit.target                   static
system-update.target               static
time-sync.target               static
timers.target                   static
umount.target                   static
logrotate.timer                   static
man-db.timer                   static
pkgstats.timer                   static
shadow.timer                   static
systemd-readahead-done.timer           static
systemd-tmpfiles-clean.timer           static

219 unit files listed.
[INFO    ] Executing command 'systemctl is-enabled sshd.service' in directory '/root'
[INFO    ] output: enabled
[INFO    ] Service sshd is already enabled, and is in the desired state
[INFO    ] Completed state [sshd] at time 11:58:07.510376
local:
----------
          ID: yajl
    Function: pkg.installed
      Result: True
     Comment: Package yajl is already installed
     Changes:
----------
          ID: ntp
    Function: pkg.installed
      Result: True
     Comment: Package ntp is already installed
     Changes:
----------
          ID: ntp
    Function: service.running
        Name: ntpd
      Result: True
     Comment: Service ntpd is already enabled, and is in the desired state
     Changes:
----------
          ID: ssh
    Function: pkg.installed
        Name: openssh
      Result: True
     Comment: Package openssh is already installed
     Changes:
----------
          ID: ssh
    Function: service.running
        Name: sshd
      Result: True
     Comment: Service sshd is already enabled, and is in the desired state
     Changes:

Summary
------------
Succeeded: 5
Failed:    0
------------
Total:     5
[root@www salt]#

 

 

 

5. Start the salt-master service and enable it:

 

# systemctl start salt-master
# systemctl enable salt-master
ln -s '/usr/lib/systemd/system/salt-master.service' '/etc/systemd/system/multi-user.target.wants/salt-master.service'

 

 

Now you're ready to start setting up your first minion.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

New laptop: Lenovo y510p

I just got a brand new laptop, a Lenovo ideapad y510p. I plan on installing and using Arch Linux on it, so bookmark this post so you can follow my progress (and also contribute if you have tried before)

I'll create separate posts so this doesn't become a super boring long article and helps you find what each person is having trouble with.

Shell: xargs with a pipe to send logs to logstash

I have been playing with Logstash this weekend and I believe I have everything setup the way I want, so to put Kibana 3 to que test, I wanted to inject all my MediaTemple logs into Logstash to start searching and get used to querying Kibana.

Hence something like this was used:

 

find . -name '*.processed' -print0 | xargs -I {} -0 -i sh -c 'cat {} | netcat 127.0.0.1 50000'

 

This will find all my logs ending in ".processed" send them to xargs that will cat each file and pipe it to netcat to my logstash instance listening on port 50000.

 

I'l post my conf files here, but there's nothing to fancy and their documentation is fantastic if I take too long to post.

 

 

VirtualBox: Fixing piix4_smbus 0000.00.07.0: SMBus base address uninitialized – upgrade bios or use force_addr=0xaddr

If you see the following error message when booting Arch Linux:
==
piix4_smbus 0000.00.07.0: SMBus base address uninitialized - upgrade bios or use force_addr=0xaddr
==

To fix this, add "blacklist i2c_piix4" to file /etc/modprobe.d/modprobe.conf

/etc/modprobe.d/modprobe.conf
==
blacklist i2c_piix4
==

mysql: Dumping single database table and restoring

Sometimes you need to dump a single table from a mysql table and restore it somewhere else. Here's what you need:

 

1. Dump the table (compress it so it will take shorter to transfer over the network)

 

mysqldump -h <HOST> -u <USERNAME> -p <DATABASE> <TABLE> | gzip > <DUMP_FILENAME>.gz

 

HOST is the hostname or IP address of the mysql server

USERNAME is a user with access to the database and table

DATABASE and TABLE are self explanatory

DUMP_FILE is the name you want for the file containing the compressed dump

 

2. Transfer the file where you need it to be, with "cp" or "scp"

 

 

cp <DUMP_FILENAME>.hz  folder/new_name

scp <DUMP_FILENAME>.hz  user@machine:folder

 

 

Linux: Some maintenance

Your linux distribution may run some maintenance jobs or checks daily and you may get things like the following in your email:

 

'<USERNAME>' is a member of the 'httpd' group in /etc/group but not in /etc/gshadow

The grpconv command creates gshadow from group and an optionally existing gshadow.

execute:

$ sudo grpconv

 

 

user 'jira': directory '/home/jira' does not exist

Simple create the folder and change its permissions:

$ sudo mkdir /home/jira
$ sudo chown jira:jira /home/jira -Rfv

 

 

 

  • IGlr