Wednesday, March 29, 2017

tmux and screen

tmux:
https://tmux.github.io/

Very good tutorial
http://www.howardism.org/Technical/Linux/tmux.html

tmux list-sessions
tmux new -s buildQualcomm
tmux kill-session -t buildQualcomm
tmux list-session
tmux attach -t test123

http://unix.stackexchange.com/questions/5832/is-there-an-equivalent-of-gnu-screens-log-command-in-tmux


screen:
multiplex multiplex a physical console among multiple process
https://www.gnu.org/software/screen/

You could start screen with the -L option. This will cause screen to create a file screenlog.n (the n part is numerical, starting with a zero) in the current working directory.

Example: screen -S session_name -L -X <a_command>

For last line of the log, it can easily be obtained with tail -1 screenlog.0, or the entire log can be parsed however you wish.

One more nuance that may be helpful in the future: If you're in a screen session, you can interactively ask for the log file to be created. Press ctrl-a H (Control-A followed by capital H) to ask screen to start dumping whatever window you're in to a log file.


Friday, March 24, 2017

Windows 10 remote desktop RDP session timeout

Use regedit to change the following
Computer->HKEY_LOCAL_MACHINE->SOFTWARE->Policies->Microsoft->Windows NT->Terminal Service -> MaxIdleTime

The unit is ms.

Note: I found that using "Local Group Policy Editor" to change Session Time Limits is useless.

Thursday, March 23, 2017

windows 10 virtual desktop

https://blogs.windows.com/windowsexperience/2015/04/16/virtual-desktops-in-windows-10-the-power-of-windowsmultiplied/
WIN + CTRL + LEFT/RIGHT: Switch to previous or next desktop
WIN + CTRL + D: Create a new desktop
WIN + CTRL + F4: Close the current desktop
WIN + TAB: Launch task view



Windows 10 Linux Subsystem, Python selenium, selenium server

Running test scripts in WLS;
Control browser in Win10.

1) download & install selenium server:
http://www.seleniumhq.org/download/

2) download & install Google Chrome Driver
https://sites.google.com/a/chromium.org/chromedriver/

3) in python scripts, add desired capability and change webdriver.get to webdriver.Remote
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities

driver = webdriver.Remote(
   command_executor='http://127.0.0.1:4444/wd/hub',
   desired_capabilities=DesiredCapabilities.CHROME)


Monday, March 6, 2017

core dump



ulimit -c unlimited

check up
ulimit -a 

echo /tmp/core-%e-%s-%u-%g-%p-%t > /proc/sys/kernel/core_pattern
echo 1 > core_uses_pid
echo 2 > suid_dumpable

Create a dummy test process
sleep 100&

kill and create a dump file
kill -ABRT <pid>