In Python, What Are Some Disadvantages to Using os.execlp to Fork a Process?

Question
In Python you are familiar with importing the os module and using different exec variations. What are some reasons that you would not use os.execlp?

Answer
1. If you use os.execlp to call another program, that program is more likely to return “Killed”. The resources of the child process are, by default, more limited in part because the fork operation is expensive from a system’s resources perspective.

How Do You Install Java so You Can Compile Programs on a RHEL Server?

Problem scenario
You have installed Java. But you cannot use the javac command. You get errors like this: “-bash: javac: command not found”

How do you install Java so you can compile programs on a RedHat Linux server?

Solution
Run this command: sudo yum -y install java-devel

If you want to do this on a Debian or Ubuntu Linux server,

How Do You Get a Raspberry Pi to Work Again after Two GPIO Pins Were Connected When They Should Not Have Been?

Problem scenario
You recently connected a jumper connector to two GPIO pins accidentally on your Raspberry Pi. Now your Raspberry Pi will not start, and it seems fried. There is a red light that is on. There is no flashing light and no green light. There is no output to the monitor. You are not sure if the Raspberry Pi is wasted.

Solution
1.

How Do You Troubleshoot the tar Error “Cannot execute remote shell: No such file or directory”?

Problem scenario
You are using the tar command. You are getting an error when you try to compress a file. This is the message:

“tar (child): Cannot execute remote shell: No such file or directory
Cannot open: Input/output error
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now”

What should you do?

How Do You Get Ubuntu/Debian Linux to Have Packages That Can Be Updated When the Upgrade Command Did Not Work?

Problem scenario
You are using Ubuntu or a Debian distribution of Linux. You log in and see this (the message of the day):

6 packages can be updated.
6 updates are security updates.

You then run this: sudo apt-get -y upgrade

But it does not work. You see this message:

“0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.”

What can you do to update your Linux server and not be warned about packages that can be updated?

How Do You Get a Script to Execute Every Time You Log in as the User in Linux?

Problem scenario
You want a script to run whenever a user logs in (e.g., when a sudoer uses “su jdoe”, you want a script to run before you assume the jdoe user). You are using Linux SUSE or Ubuntu or a Debian distribution. You found that having a script in /etc/profile.d/ does not work. What should you do?

Solution
To have a script automatically run for a given user,

How Do You Install Splunk on a Debian/Ubuntu Linux Server?

Problem scenario
You have a Debian or Ubuntu Linux server. You want to install a trial version of Splunk. What should you do?

Solution
1. Sign up for an account to get the installation media: https://www.splunk.com/en_us/download.html
2. Click on “Linux”
3. Obtain the .deb file.
4. Put the .deb file on the Linux server.
5.

How Do You Troubleshoot the Message “ERROR: but there is no YARN_RESOURCEMANAGER_USER defined.”?

Problem scenario
You run sudo bash start-yarn.sh but you receive this message:

ERROR: Attempting to operate on yarn resourcemanager as root
ERROR: but there is no YARN_RESOURCEMANAGER_USER defined. Aborting operation.

What should you do?

Solution
1. Modify start-yarn.sh. Underneath the last section of comments, place three lines with the following text:

YARN_RESOURCEMANAGER_USER=root
HADOOP_SECURE_DN_USER=yarn
YARN_NODEMANAGER_USER=root

2. Modify stop-yarn.sh.

How Do You Pass Parameters to a Function in Golang and Assign the Returned Value to a Variable?

Problem scenario
You want to pass parameters to a function and assign the returned value to a parameter using the Go programming language. What should you do?

Solution
Prerequisite
This assumes that you have installed Golang; if you need assistance with this, see this posting.

Procedures
1.