Unix Help - I cant figure out how to answer the last question. Please help!
Write a bash script to produce the answers to each of the questions below. Before the output, echo to the screen the question number and the command that will be executed.
Show a real-time view of system information, such as CPU usage, memory usage, etc., and the processes using the most CPU, memory and time.
for the question you posted you are only asking for the last question that is how to show the real time view of system information,etc. so i will try to answer only that with all my knowledge.
As a Linux user, you may need to need to know some basic details of your Linux system, like currently running processes, average system load, cpu and memory usage etc., at some point. for this , we have a command line utility called “top” to get such details.
The top command is a well-known and most widely used utility to display dynamic real-time information about running processes in Unix-like operating systems. In this brief tutorial, we are going to see some Top command examples on Linux.
To start monitoring the running processes, simply run the top command without any options:
$ top
now you will see some output in the form of tables and attributes.
the top command displays the list of processes in multiple columns. each column displays details such as pid, user, cpu usage, memory usage. Apart from the list of processes, you will also see the brief stats about average system load, number of tasks, cpu usage, memory usage and swap usage on the top.
I will explain the attributes which will come up when you will execute the top command.
Hope you got clear !
Thank you !
Unix Help - I cant figure out how to answer the last question. Please help! Write...
UNIX help!!!! I need what the text would look like in the vi editor. also note this question has been posted before and the answers were all wrong!! Write a shell script (bash or sh) that prints out the following lines/information: Only your name may be hard coded, the rest must be obtained programmatically within the shell script. Name: "Your name" Hostname: "The computer's hostname" Host IP: "The computer's IP number" Default Gateway: "The computer's default gateway" OS Version: "Whatever...
Unix questions, i need help on Hint: Commands to study to answer this question: predefined shell variables, and .profile script file, echo SHELL, HOME, PATH, MAIL and TERM are predefined shell variables. You can use the value of a shell variable in a shell command putting $ in front of it. For example, to display the value of the HOME directory of the user, specify $HOME in the echo command like echo $HOME. Do not give just the value of...
Hello all, I have a c++/unix (bash) question. I am struggling on starting this assignment. If you could start the assignment and tell me how to do the rest it would be greatly appreciated! (Quick thumbs up answer response if thorough and correct) Maintain automobile records in a database Write a shell script to create, view and modify a simple database that contains automobile records. The shell script has to be done in Bourne shell syntax (bash as a matter...
I need this done ASAP. Please write a bash shell script that does the following: Prints out how many users are logged on. This can be accomplished using who and wc. Prints out a list of currently logged on users. This can be accomplished using who, grep, regular expressions, and echo. Prints out how many processes you have running from past days, and a list of those jobs. Use `whoami` to get your username. Run ps -ef and see how...
HELP with last part!! Cant figure it out!! (a) Find the electric potential at points a and b for charges of +3.5 nC and -5.2 nC located as shown in the figure. (b) What is the potential difference N for a trip from a to b? (c) How much work must be done by an external agent to move a point charge of +2.50 nC fron a to b? 11.0 cm 11.0 cnm 15.0 cm dl 11.0 cm -5.0 cm...
Nodal Analysis Please Help!! I cant get the correct answer. I cant figure out what I'm doing wrong ξ2 κα Οεον 5 k2 100V Given: The circuit shown above. Required: Calculate the node voltages, V, and V2. Solution: Vi= v V2- v Submit these values If you are not ready to submit the answers now, you can print this work it off-line, then log in again to submit the answers. As long as you log in under the same user...
Question 2 0/1 point (graded) What happens when you remove a directory using the command rm -r? You cannot remove a directory using the rm command. You permanently remove the entire directory, including all files and subdirectories. You move the entire directory to a trash folder, but it can be restored later. You get a warning message asking if you want to proceed, then you delete the directory. incorrect Answer Incorrect: Try again. Unix does not warn you before permanently...
This is for a Unix class. Please help me out. I am attaching a skeletal code of the program below, it just needs ti be filled in. Below is a skeletal code of the program. Fork a child process and then use the parent for reading and the child for writing. This is just a way of sending and receiving messages asynchronously. /* ************************************************************* * Utility functions * ************************************************************** */ static void usageError(const char * progName, const char *msg) {...
This is a very interesting problem that i cant figure out. please answer the question clearly and show all work. Thanks! A voltage source, in the circuit shown below, is short-circuited at its terminals by closing switch Si. At the time the switch is closed, the circuit has been in operation for a long time. Circuit values. Vs- 480 V Rs-1 S RI 10 ? R2 15? L1-2 mH L2-12 mH a) Find the initial value of the current through...
Question 1: 1. Figure out what the following MATLAB code does (Notice that R n = 500 for jay - 1:4 ifjoy > 1;oldtime = time; end M rand(n); t cputime; forrep -1:5 R chol(A): en time = cputime-t; if jay > 1; ratio - time/oldtime, end en If you put these instructions into a file named, say, zap.m, you can run the program by typing zap from the MATLAB command line. The functions randn, cputime, and chol are built-in...