Posts tagged ·

linux

·...

How to determine the ulimit settings of a running process on Linux

Comments Off

Question

How can the ulimit settings of a running process be determined on Linux?

Answer

There are a number of situations where determining the ulimit settings of a running process may be necessary. The more common scenarios include determining the maximum number of file descriptors for a given process or generating a system core from a given process.

Step 1
-Determine the Process ID (PID) of the process to be investigated.

If the PID is already known, proceed to step 2.

If the PID is unknown then inspect the contents of the following file to determine the PID:

<install_root>/profiles/<profile_name>/logs/<server_name>/<server_name>.pid

  • This file should exist if the server is currently running. Exceptional circumstances could lead to a situation where this file exists and the server is not running.

The number contained within this file is the PID of the running server. 

Step 2
Once the PID is known, inspect the file at the following location:

Location:     /proc/<PID>

File:         limits

  • The contents of this file is similar to the output of the “ulimit -a” command.

This file will have a list of ulimit parameters and their associated values for the specified PID. 

Sample

Limit                     Soft Limit   ...​
Max cpu time              unlimited ​
Max file size             unlimited ​
Max data size             unlimited ​
Max stack size            10485760  ​
Max core file size        unlimited ​
Max processes             unlimited ​
Max open files            8192      ​
...​

 

Limitations
This method is only available to more recent versions of IBM WebSphere Application Server supported Linux operating systems.

The following is a list of minimum operating system versions and maintenance levels where this technique is usable:

  • RHEL 4 Update 7
  • RHEL 5 Update 2
  • SLES 10 Service Pack 3
  • SLES 11

There may be some exceptions to this list, and this list is not necessarily exhaustive; however, all the major maintenance levels (Updates / Service Packs) for RHEL 4 and 5 and SLES 9, 10, and 11 were tested. This list reflects the findings of those tests.

There may be some incremental maintenance that can be applied to support this method prior to the above versions and maintenance levels as only major maintenance levels were tested.

Comments Off

Error while mounting NFS filesystem from AIX node onto Linux NFS server

Comments Off

Problem:

While mounting NFS filesystem from AIX node named AIX_LPAR onto Linux NFS server Linux_NFS_server, got the error:

vmount: Not owner

root [AIX_LPAR] /tmp: mount Linux_NFS_Server:/local/home/app/media /mnt
mount: giving up on:
 Linux_NFS_Server:/local/home/app/media
vmount: Not owner

Solution:

Set parameter nfs_use_reserved_ports to 1 on client AIX_LPAR


root [AIX_LPAR] /tmp: nfso -o nfs_use_reserved_ports=1
Setting nfs_use_reserved_ports to 1
root [AIX_LPAR] /tmp: mount Linux_NFS_Server:/local/home/app/media /mnt
root [AIX_LPAR] /tmp:

root [AIX_LPAR] /tmp: df /mnt
Filesystem    512-blocks      Free %Used    Iused %Iused Mounted on
Linux_NFS_Server:/local/home/app/media  123728184  51936864   59%        0    -1% /mnt
root [AIX_LPAR] /tmp
Comments Off

Linux network administrator questions

1 comment

1. Give an example of set of shell commands that will give you the number of files in a directory
2. How do you tell what process has a TCP port open in Linux
3. On a Red Hat Linux Variant how do you control whether a service starts when the system boots
4. How do you tell the amount of free disk space left on a volume
5. Give an example of a set of shell commands to tell how many times “bob” has logged on to the system this month
6. Give an example of a recursively copying a directory from one location to another.
7. How do you modify the IP and Net mask of a system running a Red Hat Variant of Linux
8. Give an example of a set of shell commands that will give you the number of “httpd” processes running on a Linux box.
9. On CentOS or Fedora based system using the package management application, how do you tell what package provided the file “libnss_ldap.so”
10. What is the difference between VTP client, server, and transparent
11. What is the maximum length of CAT6
12. How does one set up a layer two link to share VLANs
13. How does one implement redundant links at Layer 2
14. What is the difference between a hub, switch, and a router
a. What are the security advantages of switch vs. hub
15. Show an example of using telnet to learn the headers of an http server.
16. In what OSI layer does PPP exist
17. What’s the difference between TCP and UDP
18. Given a DNS server that has just started (with an empty cache) and host contacting this DNS server (using it’s OS setting) to learn an address for google.com, list the steps the DNS server will take to learn it with IP addresses (each step will have multiple possible IP addresses – you need choose only one per step).
19. Why are layer 2 loops bad, and what protocol was designed to prevent them
20. Given a radius server at 10.0.0.2 and a shared key of ‘abc123’ show the IOS commands necessary to authenticate switch users against the radius server, while still allowing the use of local username / password pairs