|Mapping of SHELL command with CMD commands|
How to set the proxy in CMD?
You need to run the following command in the CMD to set the proxy.
set HTTP_PROXY=http://your_proxy:your_port set HTTPS_PROXY=https://your_proxy:your_port
How to add a IP, DNS to your Windows hosts file?The Linux OS maintains /etc/hosts and it can be editable only by root user. Whereas, in Windows OS same file is available at c:\windows\system32\drivers\etc\hosts. This will be same for Windows 7 and Windows 8.1. You could also check in the hot Windows 10. Hence the command to edit this :
start notepad c:\windows\system32\drivers\etc\hostsYou can also use WindowKey + R and paste:
notepad c:\windows\system32\drivers\etc\hostsin the Open text box and click on 'Ok' button.
How do I open Environment Variables Windows from command prompt?When you work for installing OFMW product installation on Windows system you might setting the PATH, WL_HOME, CLASSPATH, JAVA_HOME in the environment variables to work more efficiently from the command prompt instead of setting in the command prompt. If you set these variables in the User defined environment variables we must open a fresh cmd prompt.
I've Windows 8.1 system on command prompt executed the following command
You could also run in the Run window :
Where is Java installed in Windows (which/where commands like in Linux)?
How to find WebLogic server PID with Port in Windows?
On Windows platform you can use netstat command with -n -a -o options which works same as in Linux platforms. Filter of the process id list can be done with ^| (cap followed by pipe). Then you can use it for terminating by taskkill command.
FOR /F "tokens=4 delims= " %P IN ('netstat -a -n -o ^| findstr :7001') DO ^ @ECHO TaskKill /PID %P /f /tIn batch scripts you can use %%P if it is command line you can only use %P. If your system is Windows 7 then you need tokens=5. Above command only that matches :7001 port mapped pid with message taskkill command option. You can kill by copy paste out of them which are really matches to weblogic running process or you directly remove the @echo and execute, if that above command give accurate process list. Note: Double check the process list.
How to find the Free Available Memory from CMD as in Linux free -m?
In Windows about Total, Free, Virtual Memory info we can get from systeminfo, it is a command that will output system information, We can filter out Mem string using findstr
D:\>systeminfo |findstr Mem Total Physical Memory: 16,294 MB Available Physical Memory: 12,798 MB Virtual Memory: Max Size: 20,390 MB Virtual Memory: Available: 15,792 MB Virtual Memory: In Use: 4,598 MB
Killing NodeManager in Windows using Taskkill command
In the Windows we can do this task from the task manager. Here I can get the PID of NodeManager using jps command.
It is Linux kill/pkill like command is taskkill for Windows. You need to know the options how to use it for terminating the process. You could get the help by typing the
Sample taskkill example for killing NodeManager process.
C:\>jps 6312 NodeManager 2524 WLST 10376 Jps C:\>taskkill /pid 6312 /f /t SUCCESS: The process with PID 6312 (child process of PID 2524) has been terminated.
shutdown -t 0 -r -f
For a more friendly "give them some time" [GRACEFUL SHUTDOWN] option, you can use option with time interval like this:
shutdown -t 30 -r
- The parameter causes a reboot (which is usually what you want on a remote machine, since physically starting it might be difficult).
- The parameter option forces the reboot.
- You must have appropriate privileges to shut down the remote machine, of course.
c:\OFMW\jdk-7u79-windows-x64.exe /s /v /qn ADDLOCAL=ToolsFeature INSTALLDIR=C:\Java /L C:\jdk.log
where this also include the installation of tools.jar, locale features also installed with ADDLOCAL option.
Note: The INSTALLDIR cannot be overridden, if one time JDK installed you cannot install in other path. You need to uninstall from control panel.