Skip to main content

Posts

Showing posts with the label Linux

LSF Farm commands

To know the resource information which is supported by the bsub -R option are as follows: $> lsinfo type           String   N/A   Host type model          String   N/A   Host model status         String   N/A   Host status hname          String   N/A   Host name setnprocs     Numeric   Dec   Set the number of processors setncores     Numeric   Dec   Set the total number of cores vcs           Numeric   Dec   flexlm VCSRuntime_Net vcs_rh6       Numeric   Dec   flexlm VCSRuntime_Net mti           Numeric   Dec   flexlm Questa pcie          Numeric   ...

Starting a simple Web server

Looked around to have some simple way of getting a web server up on linux/mac. Python: With python 5.4 there is  a simple web server that it can run. Command to launch HTTP server with python: python -m SimpleHTTPServer This will use the document root top as the current directory. Php: with python 5.4 there is web server that is default built in. Command: php -S 127.0.0.1:80 -t . This will launch the webserver with document root as "."

Remove .nfsXXXXX files

Sometime s it is so irritating when you want to remove some thing in linux and you find .nfsXXXXX file “Cannot be removed: Device or resource busy”. ps command would not help in these scenarios to know what is actually using it. lsof is a command in linux to figure the open files. The output of this command is the list of files that open and used by the processes, the process name and PID of the process that is using the file. To remove .nfsXXXX files. Run lsof command Find the processID of the process that is using .nfsXXXX file. Kill the process. Remove the .nfsXXX file using rm command.