Smriti 10711260

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

1

Assignment 1
Smriti Chandravanshi[10711260]

1. _Details about the commands that we use in Linux.


cd
It refers to “change directory” and, as its name suggests, switches you to the directory you’re
trying to access.
For instance, if you are inside Documents directory and trying to access one of its subfolders
called Videos, you can enter it by typing cd videos.
You can also supply the absolute path of the folder: cd/home/Document/Videos
There are some tricks with the cd command that can save you a lot of time when playing
around with it:
Go to home folder: - cd
Move a Level Up: - cd ..
Return to previous directory: cd –
mkdir

To create folders in the shell, you use the mkdir command. Just specify the new folder’s name,
ensure it doesn’t exist, and you’re ready to go.
For example, to make a directory to keep all of your images, just type: mkdir images

cp
It’s so easy to copy files and folders directly in the Linux terminal that sometimes it can replace
conventional file managers.
To use the cp command, just type it along with the source and destination files:
cp file_to_copy.txt new_file.txt
You can also copy entire directories by using the recursive flag:
cp -r dir_to_copy/ new_copy_dir/

mv
You use the mv command to move (or rename) files and directories through your file system.
pwd
The pwd command stands for “print working directory,” and it outputs the absolute path of the
directory you’re in. For example, if your username is “john” and you’re in your Documents
directory, its absolute path would be: /home/john/Documents.
Ls

10711260
2

It allows us to list the contents of the directory we want (the current directory by default), including
files and other nested directories.

df
The df command displays the amount of disk space available on the filesystem with each file
name's argument
du
du stands for Disk Usage. It is used to check the information of disk usage of files and directories
on a system.
Command du display a list of all the files along with their respective sizes. By default, size given
is in kilobytes.
rm
You can use the rm command to remove files and directories. Be careful while using it
kill
It’s annoying when a program is unresponsive, and you can’t close it by any means. Fortunately,
the kill command solves this kind of problem.
Simply put, kill sends a TERM or kill signal to a process that terminates it.
grep
Grep is one of the most powerful utilities for working with text files. It searches for lines that
match a regular expression and print them
ps-ef|grep
You can use this ps command to find the number of processes running in your Linux server. This
is mostly used by system admins and root users to check if there are not too many processes
running on the host or not.

more
more command is used to view the text files in the command prompt, displaying one screen at a
time in case the file is large (For example log files). The more command also allows the user do
scroll up and down through the page.
less
less (opposite of more) is a program that lets you inspect files backward and forward
touch
The touch command allows you to create and update the access and modification times of the
specified files.

10711260
3

man
It displays the manual page of any other command (as long as it has one).
To see the manual page of the mkdir command, type: man mkdir
vi
Using vi editor, we can edit an existing file or create a new file from scratch. we can also use this
editor to just read a text file.

2. Learn about vi editor.

(Vi editor is like a notepad for the linux where u can modify the files .)
Vi Editing Commands
i – Insert at cursor (goes into insert mode)
a – Write after cursor (goes into insert mode)
A – Write at the end of line (goes into insert mode)
ESC – Terminate insert mode.
u – Undo last change.
U – Undo all changes to the entire line.
o – Open a new line (goes into insert mode)
dd – Delete line.

- How to insert delete in a file with vi editor and save the file.
 Step 1 vi file name
It will take you inside the file and enable editing mode
Step 2 Type delete
Step 3 press Esc:wq it will save file and quite the file

3. Compare the content of 2 files.


To compare two files, type the following: diff chap1.bak chap1. This displays the differences
between the chap1. ...
To compare two files while ignoring differences in the amount of white space, type the
following: diff -w prog.c.bak prog.c.

4. Difference between directory and file.

10711260
4

A file is any kind of computer document and a directory is a computer document folder or filing
cabinet. We can create multiple files and directory inside a single directory.
5. How to copy a directory.
cp stands for copy. This command is used to copy files or group of files or directory. It creates
an exact image of a file on a disk with different file name. cp command require at least two
filenames in its arguments.

For example: - cp Documents Pictures

6. How to zip/unzip a file .


zip myzip file1 file2 file3
This puts the files named file1, file2, and file3 into a new zip archive called myzip.zip.
unzip myzip.zip
If you have an archive named myzip.zip and want to get back the files,we can use this command
7. What is tar command use for ?
The Linux 'tar' stands for tape archive, is used to create Archive and extract the Archive files. tar
command in Linux is one of the important command which provides archiving functionality in
Linux. We can use Linux tar command to create compressed or uncompressed Archive files and
also maintain and modify them.
8. What are various privilege/permission available for a file? How to change permission of a
file .
Various privilege
Read - r
Read Write - rw
Execute - x
Read write execute – rwx
How to change permission of a file .
chmod 451 file-name

the chmod command is used to change the access mode of a file.


9. How to change ownership of the file or directory.
You can change the ownership of a file or folder using the chown command. In some cases,
changing ownership requires sudo permissions.
chown user filename

10711260
5

10. How to add/create user in linux?


Following are steps to add an user in Linux:
1. Log in as root 2. Use the command useradd name of the user(for example, useradd Abc)
3. Use su plus the name of the user you just added to log on.

11. How to delete the user in linux.


Following are steps to add an user in Linux:

1. Switch to the root user: sudo su -


2. Use the userdel command to remove the old user: userdel user's username.

12. How to list files according to increasing file size


To list all files and sort them by size, use the -S option.

13. Check server/machine is up from how many days?


To Check server/machine is up from how many days the uptime command is used.
The uptime command gives a one line display of the following information.
* The current time
* How long the system has been running
* How many users are currently logged on
* The system load averages for the past 1, 5, and 15 minutes
For Ex:-- 12:05:50 up 30 min, 2 users, load average: 0.31, 0.15, 0.15
14. Which version of Linux is running?
The command “uname -r” shows the version of the Linux kernel that you're currently using.
15. Use of find command
The find command is used to search and locate the list of files and directories based on
conditions you specify.
16 . What is virtual IP?
A virtual IP is an IP address that can be assigned to multiple instances at once or become a
second address to the network interface.
17. Web Server :

10711260
6

The web server is a computer that stores web server software and a website's component files
(for example, HTML documents, images, CSS stylesheets, and JavaScript files). It connects to
the Internet and supports physical data interchange with other devices connected to the web.
Types of logs in Webserver
Types of logs in Webserver :
1. Access log file
2. Agent log file
3. Error log file
18. WebSphere Application Server
WebSphere is an Application Server Middleware product.
Types of logs .
1. JVM logs
2. Native logs
3. Trace logs
4. Activity logs
5. Profile logs
6. Installation logs
7. Fixpack logs
19. What are the types of logs available in WAS . How to find the jvm or server instance log
path. Give command
Types of logs
1. JVM logs
2. Native logs
3. Trace logs
4. Activity logs
5. Profile logs
6. Installation logs
7. Fixpack logs

View the JVM logs from the administrative console.


1. Start the administrative console.
2. Click Troubleshooting > Logs and Trace in the console navigation tree. To view the logs for a
particular server, click on the server name to select it, then click JVM Logs.

10711260
7

Assignment 02
21. What is the general syntax url for dmgr console ? How to find dmgr console url and
port?
Ans:
http://<hostname>:<portnumber> - For unsecure port (9060)
https://<hostname>:<portnumber> - For secure port (9043)
For windows: C:\ProgramFiles\IBM\WebSphere\AppServer\profiles\DmgrNode01\
logs>AboutThisProfile.txt
For Linux : ../IBM/WebSphere/AppServer/profiles/DmgrNode01/logs>cat AboutThisProfile.txt
22. What is soap port and where it is located ?
Ans. SOAP is Simple Object Access Protocol. It C:\ProgramFiles\IBM\WebSphere\AppServer\
profiles\DmgrNode01\logs>AboutThisProfile.txt. We can find the port number for the SOAP
port under the AboutThisProfile.txt file.
23. What is nodeagent and why we do the synchronization .
Ans. NodeAgent is a running server that represents a node in WebSphere Application Server.
We need to do synchronization because if we made

24. Difference between kill -9 and kill -3 command


“ kill -9” command sends a kill signal to terminate any process immediately when attached with
a PID or a processname. It is a forceful way to kill/terminate a or set of processes. “ kill -9 <pid>
/ <processname>” sends SIGKILL (9) — Kill signal. This signal cannot be handled (caught),
ignored or blocked. Hence, this immediately kill the process without any handling and this can
create zombies process.

kill -3 is a thread dump that will list all the Java threads that are currently active in Java Virtual
Machine (JVM).

25. What is heapdump and how to create heapdump manually ?


Ans. Heap dump is a JVM memory snapshot. All the objects created in java are stored in a heap.
Start administrative console. In the navigation pane, click Troubleshooting > Java dumps and
cores. Select the server name (AppNode01) for which you want to generate the heap dump. Click
Heap dump to generate the heap dump for your specified server. (AppNode01).

10711260
8

The file will be generated in this path :


C:\Program Files\IBM\WebSphere\AppServer\profiles\AppNode01\<dumpfile>

26. What is javadump and how to create javadump manually?

Start administrative console. In the navigation pane, click Troubleshooting > Java dumps and
cores. Select the server name (AppNode01) for which you want to generate the Java dump. Click
Heap dump to generate the java dump for your specified server. (AppNode01).
The file will be generated in this path :
C:\Program Files\IBM\WebSphere\AppServer\profiles\AppNode01\<dumpfile>

27. How to check WAS version(Windows/Linux)


ANS. For windows:
C:\Program Files\IBM\WebSphere\AppServer\profiles\DmgrNode01\bin>versionInfo.bat
For Linux :
../IBM/WebSphere/AppServer/profiles/DmgrNode01/bin> versioninfo.sh

28. If nodeagent is down can we bring up the jvm / server instance

29. If Dmgr is down can we bring up the jvm / server instance

30. How to stop start the dmgr . where are the logs for DMGR.?(Windows/Linux)
Ans.
To Start the dmgr, navigate to the following path in windows :
C:\Program Files\IBM\WebSphere\AppServer\profiles\DmgrNode01\bin>startManager.bat
To Start the dmgr, navigate to the following path in Linux :

10711260
9

../IBM/WebSphere/AppServer/profiles/DmgrNode01/bin>startManager.sh
To Stop the dmgr, navigate to the following path in windows :
C:\Program Files\IBM\WebSphere\AppServer\profiles\DmgrNode01\bin>stopManager.bat
To Stop the dmgr, navigate to the following path in Linux :
../IBM/WebSphere/AppServer/profiles/DmgrNode01/bin>stopManager.sh
For logs, navigate to the following path :
C:\Program Files\IBM\WebSphere\AppServer\profiles\DmgrNode01\logs\dmgr

31. How to stop start the nodeagnet . where are the logs for nodeagent?(Windows/Linux)
Ans.
To Start the node agent, navigate to the following path in windows :
C:\Program Files\IBM\WebSphere\AppServer\profiles\AppNode01\bin>startNode.bat
To Start the node agent, navigate to the following path in Linux :
../IBM/WebSphere/AppServer/profiles/AppNode01/bin>startNode.sh
To Stop the node agent, navigate to the following path in windows :
C:\Program Files\IBM\WebSphere\AppServer\profiles\AppNode01\bin>stopNode.bat
To Stop the node agents, navigate to the following path in Linux :
../IBM/WebSphere/AppServer/profiles/AppNode01/bin>stopNode.sh
For logs, navigate to the following path :
C:\Program Files\IBM\WebSphere\AppServer\profiles\AppNode01\logs\nodeagent

32. What is application deployment ? what are various ways available for application
deployment .

33. What are the pre-checks before application deployment or update ?

34. How to check webserver status? What are logs file for webserver? Also state the
configurations file in webserver?

10711260
10

35. What is plugin-cfg.xml and its location ?


Ans : The plugin-cfg.xml file contains configuration information that determines how the web
server plug-in forwards requests.
Location for PLUGIN-CFG.XML FILE :
C:\Program Files\IBM\WebSphere\AppServer\profiles\DmgrNode01\config\cells\LAPTOP-
B7H0VJ1UCell01\nodes\AppNode01\servers\Websrv01\ plugin-cfg.xml

36. If you try to hit the URL example www.xxyzpqr.com , it shows an error like page
cannot be displayed. How will you troubleshoot this issue?
Ans. If we hit the URL www.xxyzpqr.com , it shows an error like page cannot be displayed. This
is because we may have entered the incorrect URL or it may have moved to new URL.
TO SOLVE THIS:
Just Check the internet connection.
Clear the Cache , Cookies of the browser.
Re-Check the entered URL.

37 In a cluster environment one of the servers is about to reach 100% CPU utilization,
remaining servers are in normal utilization. how it will occur and what is the reason for
that case and how to resolve these kind things?
Ans : Reasons:
One of the JVM may be down.
Load Balancing may not be configured properly.
Synchronisation across the JVM is not done properly.

10711260
11

Runtime weightage may be configured as 0


Solutions:
Check whether all the JVMs are UP & Running .
Check with the load balancing.
Do the Synchronisation across the JVM.
Change the runtime weightage number.

38 If client is facing that his/her application is slow, then what are the steps which needs to be
followed to resolve the issue?

39. What is Fixpack ?


Ans. Small fixes released by IBM that has some minor / small changes.

40. What is heap memory ?


Ans. Heap memory is the run time data area from which the memory for all java class instances
and arrays is allocated. The heap is created when the Java Virtual Machine starts up and may
increase or decrease in size while the application runs.

10711260

You might also like