How to check server status in suse linux? - linux

I have a below machine :
LSB Version: core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch
Distributor ID: SUSE LINUX
Description: SUSE Linux Enterprise Server 11 (x86_64)
Release: 11
I have a server called as Xserver i need to check the status of server whether it is up/down/running.
What command should i use to check server status?

Is your 'Xserver' a some kind of Linux daemon or service?
If so you should be able to check it with the following command:
systemctl status xserver
You need to be sure that your service name is 'xserver' exactly!
You can find which services are running on your system by using this command:
chkconfig --list

Related

OCI runtime error for Docker on Debian Bullseye

I am superficially familiar with docker and know a bit about linux but my current situation has me out of depth.
I am repurposing an older laptop (Thinkpad T540p) to host a few network services via docker. I was able to install and run docker on it using the previous OS (Ubuntu 18 or 20 LTS), tested using docker run hello-world.
After that I reinstalled the laptop, now using Debian Bullseye. I ran apt update && apt upgrade after installing to ensure an up to date system and installed docker. When I ran docker run hello-world however, an error occurred that I have been unable to debug.
Some info:
root#machine:$ docker run hello-world
docker: Error response from daemon: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: process_linux.go:458: setting cgroup config for procHooks process caused: can't load program: operation not permitted: unknown.
ERRO[0002] error waiting for container: context canceled
root#machine:$ docker --version
Docker version 20.10.6, build 370c289
root#machine:$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
root#machine:$ uname -a
Linux machine 4.19.0-16-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 GNU/Linux
I have been looking around for issues containing a similar error to mine and found
https://github.com/opencontainers/runc/issues/2167 (CloudLinux with cgroups/procHooks error)
https://github.com/docker/for-linux/issues/1183 (slightly different but system capability mismatch or something like that)
docker: Error response from daemon: OCI runtime create failed
All seeming to point towards some kind of Seccomp/AppArmor setting that is blocking Docker from starting, but I have no clue what to change in order to get it working. The terms AppArmor and Seccomp were random jargon to me 2 days ago so I would rather not just go edit some system config file.
Clues on what is going wrong or what to change are very much appreciated.

debian /etc/shutdown.allow does not fire when trying to shut down computer

i have a linux box where a remote management application should shut down the box. Those remote management application is running under a normal restrictive user (no root) and the shutdown does just not work.
I have created a file /etc/shutdown.allow and entered the name of that restricted user, but when i execute i get this error:
myuser/mybox:$ shutdown
command not found
also a shutdown -a is not recognized and this switch is also not mentioned in the shutdown manual
Is there a way to enable a user or a application running under a restricted user to shutdown the box at all?
INFO: a sudo shutdown of course is working from cmd-line, but does not enable the application to shut down the box and i would not be happy to let that application run as root user.
Anybody a idea?
Thank you.
INFO:
$ uname -a
Linux mybox 3.16.0-4-amd64 #1 SMP Debian 3.16.51-3 (2017-12-13) x86_64 GNU/Linux
$ cat /etc/issue
Debian GNU/Linux 8
You can only run shutdown as root user. Maybe you can run this using a sudo.

How to run a ReactJS application at startup on Beaglebone?

My main computer is running Ubuntu 18,04, I developed an application on ReactJS on FrontEnd, NodeJS on BackEnd and MySQL concerning the database ON beaglebone. .
More information about my BeagleBone :
root#beaglebone:~# uname -a
Linux beaglebone 3.8.13-bone71.1 #162 SMP Fri Oct 16 07:27:34 CST 2015 armv7l GNU/Linux
I want to run my application always at startup on BeagleBone
What can I do to make a script run as soon as it boots up ?
Short answer: Just like on any other device (including PC or Server) that runs a Linux distribution.
Some quick pointers:
Latest BeagleBone Images are Debian 9.4 based
Use an "IoT" image unless you really need the HDMI (or LCD) output and accept the lower performance.
Debian uses systemd to manage automatic starting and stopping of software services
Create a systemd service file that invokes a process you need (e.g. npm) as the desired user (probably 'debian'). There seem to be helper tools like service-systemd
reload systemd systemctl daemon-reload to make it aware of the new file
enable it systemctl enable myfancy.service
Both flavours of mySQL on Debian (mysql-server and mariadb-server) come with a systemd file already.

Oracle on lxc in ubuntu

I'm currently trying to install an oracle server (11g) in a linux container on ubuntu (following this tutorial (http://www2.hawaii.edu/~lipyeow/ics321/2014fall/installoracle11g.html).
When I try to change the file handler with sysctl, the modifications doesn't save into my container. Moreover, when I make the modification in the main ubuntu kernel, it propagates to the containers, so my question is as follow:
How can I modify the file handlers only in my oracle container ?
Thanks.
Try out the Orabuntu-LXC project code. It supports Ubuntu 16.04, 17.04, 17.10 and is purpose-built for running Any Oracle on Any Linux, including Ubuntu Linux. Note that as you probably already know, Oracle Corp does not formally support or certify Oracle on Ubuntu Linux.
As far as you question about the file handlers, some sysctl values can only be set at the LXC host level, and some can be set in the container.
https://sites.google.com/site/nandydandyoracle/oracle-rac-in-lxc-linux-containers/oracle-lxc-vlc#TOC-Install-the-etc-sysctl.conf-File-Required-for-Oracle
https://github.com/gstanden/orabuntu-lxc
https://sites.google.com/site/nandydandyoracle/
Please note that the step-by-step guides are quite old and that the basic LXC infrastructure together with OpenvSwitch, an LXC-containerized DNS/DHCP, and an optional SCST Linux SAN can all be installed on Ubuntu 16.04, 17.04 and 17.10 with one command:
./anylinux-services.sh
after completion of which all you would need do is download your Oracle database installtion media and install.

What Linux version does CircleCI use? Can it be modified?

We've connected our node.js app with CircleCI. I understand how to control which services are running on the machine, but not how to identify the OS version, or whether there's a way to change it, so that the unit tests will run on the same OS version as the production machine.
Per the documentation, CircleCI currently uses Ubuntu 12.04.
You can check for yourself by running a build with ssh enabled and examining one of the build instances:
$ ssh -p 64538 ubuntu#54.205.50.104 cat /etc/os-release
NAME="Ubuntu"
VERSION="12.04.5 LTS, Precise Pangolin"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu precise (12.04.5 LTS)"
VERSION_ID="12.04"
The question of whether you can use a different OS has already been answered here. The answer is that you can use a Docker image with a different OS, but you can't replace the build container's base OS.
Another way to detect OS version, other than via ssh, is adding the same command to the circle.yml file. For example:
machine:
pre:
- cat /etc/os-release
That way, the OS version will show in the log of every build.

Resources