lsof | grep "deleted" or
lsof | grep "process" (rather long and messy)
nothing is impossible!!!!
Thursday, December 18, 2008
df command shows different used disk space than du.
If the files are deleted (by rm command) while they are being opened or used by a Linux program / process, the evil of “open file descriptor” problem arises and confuse the Linux file system on reporting the real figure of used disk space or free disk space available.
In order to resolve the fake “disk space full” problem, i.e. to reclaim “used disk space”, you need to kill or terminate the “defunct process” - in this case, the rm command that turns to be defunct process while the files are being used.
Once these defunct processes are terminated, the “open file descriptor” problem will be resolved, and both the du and df commands will agree to report the real file system used disk space or free disk space!
In order to resolve the fake “disk space full” problem, i.e. to reclaim “used disk space”, you need to kill or terminate the “defunct process” - in this case, the rm command that turns to be defunct process while the files are being used.
Once these defunct processes are terminated, the “open file descriptor” problem will be resolved, and both the du and df commands will agree to report the real file system used disk space or free disk space!
Use remote Linux GUI application tools locally.
You must have OpenSSH server installed.
Open SSHD configuration file /etc/ssh/sshd_config
$ sudo vi /etc/ssh/sshd_config
Turn on X11Forwarding by setting X11Forwarding parameter to yes:
X11Forwarding yes
Save and close the file.
Restart OpenSSH server you so the changes will take place:
$ sudo /etc/init.d/sshd restart
Logout and close ssh connection.
Running a command remotely
$ ssh -X 203.199.92.106 /usr/bin/gnome-terminal
Another option is to connect to the remote server and use X port forwarding:
$ ssh -X {remote server}
Reference Links:
* Refer to OpenSSH man pages (man sshd, sshd_config, ssh_config)
* VNC - An alternative to X forwarding
Open SSHD configuration file /etc/ssh/sshd_config
$ sudo vi /etc/ssh/sshd_config
Turn on X11Forwarding by setting X11Forwarding parameter to yes:
X11Forwarding yes
Save and close the file.
Restart OpenSSH server you so the changes will take place:
$ sudo /etc/init.d/sshd restart
Logout and close ssh connection.
Running a command remotely
$ ssh -X 203.199.92.106 /usr/bin/gnome-terminal
Another option is to connect to the remote server and use X port forwarding:
$ ssh -X {remote server}
Reference Links:
* Refer to OpenSSH man pages (man sshd, sshd_config, ssh_config)
* VNC - An alternative to X forwarding
Wednesday, December 17, 2008
Tuesday, December 16, 2008
How Solaris is different from Linux.
File system structure is same as other *nix. few differences are,
- /usr/adm is symlink to /var/adm which is similar to linux /var/log.
- /usr/sadm - Solaris admin tools like SMC (Solaris management tools)
- /usr/proc - Solaris ptools(process tools) such as pfiles, pmap, pwdx, pstack.
- /usr/X11 - X server and related tools.
Solaris doesnt contain /root directory. Root user shouldnt be doing things which requires /root directory.
In Solaris you will also not find SUDO utility because of RBAC (Role Based Access Control).
In solaris need to add NFS shares to /etc/dfs/dfstab. DFS stands for Distributed File System.
To export filesystems you can edit /etc/dfs/dfstab and run exportfs -a (or svcadm restart svc:/network/nfs/server) or you can use the share command. share allows you to quickly export a filesystem, so if you wanted to NFS share /opt you could just execute share /opt and your done.
Solaris doesn't have top. But, we have something better yet similar: prstat.
you can use the Solaris "ptools" (process tools) to learn more about a process, such as pstack `pgrep cron` to see the call stack of the cron process, or pfiles `pgrep firefox-bin` to see details about every file that Firefox has open.
Packages come in two varieties: filesystem format and datastream.
- A filesystem format package is what you'll find on Sun CD's and is really just a directory stucture containing all the various elements and files of the package.
- A datastream package is a filesystem format package thats rolled into a single file making it easy to compress and distribute over the net. Packages use a common naming convension of ORGsoftware, such as SUNWspro
Both types of packages are installed using the pkgadd command (ie: pkgadd -d ./CUDLgcc-4.0.1.pkg for datastream and pkgadd -d . for filesystem format).
Use svcs to view services, svcadm to administer them (start, stop, etc), and svccfg to add or change them.
SMF services are described in XML manifests, find the default system manifests in /var/svc/manifest. Manifests describe a service, what its dependancies are, supply optional metadata, and provide methods to start, stop, refresh, or restart a service.
The standard Solaris naming convension for disks is: c0t0d0s0, that is to say: controller 0, target 0, LUN 0, slice 0.
- /usr/adm is symlink to /var/adm which is similar to linux /var/log.
- /usr/sadm - Solaris admin tools like SMC (Solaris management tools)
- /usr/proc - Solaris ptools(process tools) such as pfiles, pmap, pwdx, pstack.
- /usr/X11 - X server and related tools.
Solaris doesnt contain /root directory. Root user shouldnt be doing things which requires /root directory.
In Solaris you will also not find SUDO utility because of RBAC (Role Based Access Control).
In solaris need to add NFS shares to /etc/dfs/dfstab. DFS stands for Distributed File System.
To export filesystems you can edit /etc/dfs/dfstab and run exportfs -a (or svcadm restart svc:/network/nfs/server) or you can use the share command. share allows you to quickly export a filesystem, so if you wanted to NFS share /opt you could just execute share /opt and your done.
Solaris doesn't have top. But, we have something better yet similar: prstat.
you can use the Solaris "ptools" (process tools) to learn more about a process, such as pstack `pgrep cron` to see the call stack of the cron process, or pfiles `pgrep firefox-bin` to see details about every file that Firefox has open.
Packages come in two varieties: filesystem format and datastream.
- A filesystem format package is what you'll find on Sun CD's and is really just a directory stucture containing all the various elements and files of the package.
- A datastream package is a filesystem format package thats rolled into a single file making it easy to compress and distribute over the net. Packages use a common naming convension of ORGsoftware, such as SUNWspro
Both types of packages are installed using the pkgadd command (ie: pkgadd -d ./CUDLgcc-4.0.1.pkg for datastream and pkgadd -d . for filesystem format).
Use svcs to view services, svcadm to administer them (start, stop, etc), and svccfg to add or change them.
SMF services are described in XML manifests, find the default system manifests in /var/svc/manifest. Manifests describe a service, what its dependancies are, supply optional metadata, and provide methods to start, stop, refresh, or restart a service.
The standard Solaris naming convension for disks is: c0t0d0s0, that is to say: controller 0, target 0, LUN 0, slice 0.
Subscribe to:
Posts (Atom)
