> ps aux
'서버관리' 카테고리의 다른 글
우분투 원격터미널 접속 (0) | 2013.01.04 |
---|---|
특정디렉토리 하위디렉토리 리스트 얻어오기 (0) | 2012.10.30 |
넷백업 빠른 백업 결과 조회 (0) | 2012.10.22 |
[NETBACKUP] 백업대상 파일시스템 구하기 (1) | 2012.10.16 |
[HP-UX] 프로세스별 CPU, MEMORY 사용량 (0) | 2012.10.05 |
> ps aux
우분투 원격터미널 접속 (0) | 2013.01.04 |
---|---|
특정디렉토리 하위디렉토리 리스트 얻어오기 (0) | 2012.10.30 |
넷백업 빠른 백업 결과 조회 (0) | 2012.10.22 |
[NETBACKUP] 백업대상 파일시스템 구하기 (1) | 2012.10.16 |
[HP-UX] 프로세스별 CPU, MEMORY 사용량 (0) | 2012.10.05 |
> export UNIX95=1
> ps -ef -o "user,pcpu,cpu,sz"
우분투 원격터미널 접속 (0) | 2013.01.04 |
---|---|
특정디렉토리 하위디렉토리 리스트 얻어오기 (0) | 2012.10.30 |
넷백업 빠른 백업 결과 조회 (0) | 2012.10.22 |
[NETBACKUP] 백업대상 파일시스템 구하기 (1) | 2012.10.16 |
[AIX] 프로세스별 CPU, MEMORY 사용량 (0) | 2012.10.05 |
import subprocess
cmd = 'ls -al'
subprocess.call(cmd,shell=True)
drwxrwxr-x 2 root games 4096 Jun 28 12:45 linux_x86_64
-rw-r--r-- 1 root root 5235 Sep 15 08:02 install.log.syslog
-rw-r--r-- 1 root root 60894 Sep 15 08:02 install.log
-rw------- 1 root root 2285 Sep 15 08:02 anaconda-ks.cfg
drwxr-xr-x 2 root root 4096 Sep 15 08:20 Desktop
[CODE] netbackup 백업 대상 디렉토리 목록 가져오기 (0) | 2012.10.19 |
---|---|
[CODE] 파이썬 소켓 프로그래밍 (0) | 2012.10.19 |
[CODE] 파이썬 외부 명령어 설행(os.system) (0) | 2012.10.04 |
[CODE] host에 할당된 기본 IP 찾아내기 (0) | 2012.09.27 |
[CODE] 현재 사용중인 interface name 가져오기 (0) | 2012.09.27 |
import os
cmd = 'ls -al'
os.system(cmd)
total 1571540
drwxr-x--- 26 root root 4096 Oct 4 01:22 .
drwxr-xr-x 33 root root 4096 Sep 20 01:17 ..
-rw-r--r-- 1 root root 1462227520 Sep 17 01:45 ABR11A_ko-KR.exe
-rw------- 1 root root 2285 Sep 15 08:02 anaconda-ks.cfg
-rw------- 1 root root 16332 Sep 27 23:52 .bash_history
-rw-r--r-- 1 root root 24 Jul 13 2006 .bash_logout
-rw-r--r-- 1 root root 364 Sep 16 02:34 .bash_profile
-rw-r--r-- 1 root root 1276 Sep 16 02:33 .bashrc
-rwxr-xr-x 1 root root 40 Oct 4 01:22 cmd.py
[CODE] 파이썬 소켓 프로그래밍 (0) | 2012.10.19 |
---|---|
[CODE] 파이썬 외부 명령어 설행(subprocess) (0) | 2012.10.04 |
[CODE] host에 할당된 기본 IP 찾아내기 (0) | 2012.09.27 |
[CODE] 현재 사용중인 interface name 가져오기 (0) | 2012.09.27 |
[CODE] Port Scanner 예제 (0) | 2012.09.26 |
>> import py_compile
>> py_compile.compile('test.py')
>> quit
[CODE] 하위디렉토리 리스트 구하기 (1) | 2012.10.19 |
---|---|
[서버의 hostname을 가져오는 코드를 만들어주세요] (0) | 2012.09.24 |
너무 간단한가요??
import socket
socket.gethostbyname(socket.getfqdn())
[CODE] 파이썬 외부 명령어 설행(subprocess) (0) | 2012.10.04 |
---|---|
[CODE] 파이썬 외부 명령어 설행(os.system) (0) | 2012.10.04 |
[CODE] 현재 사용중인 interface name 가져오기 (0) | 2012.09.27 |
[CODE] Port Scanner 예제 (0) | 2012.09.26 |
[CODE] TKINTER 메뉴 만들기 (0) | 2012.09.24 |
import commands
ETHER_NAME=0
HEADER=2
result=commands.getoutput('netstat -ni').split('\n')[HEADER:]
ether_name=[]
for line in result:
ether=line.split()[ETHER_NAME]
if ether != 'lo':
ether_name.append(ether)
print ether_name
['eth0', 'eth1']
[CODE] 파이썬 외부 명령어 설행(os.system) (0) | 2012.10.04 |
---|---|
[CODE] host에 할당된 기본 IP 찾아내기 (0) | 2012.09.27 |
[CODE] Port Scanner 예제 (0) | 2012.09.26 |
[CODE] TKINTER 메뉴 만들기 (0) | 2012.09.24 |
[CODE] 시스템 정보 가져오기 (0) | 2012.09.24 |
#!/usr/bin/env python
from socket import *
if __name__ == '__main__':
target = raw_input('Enter host to scan: ')
targetIP = gethostbyname(target)
print 'Starting scan on host ', targetIP
#scan reserved ports
for i in range(20, 1025):
s = socket(AF_INET, SOCK_STREAM)
result = s.connect_ex((targetIP, i))
if(result == 0) :
print 'Port %d: OPEN' % (i,)
s.close()
~$ ./scanner.py
Enter host to scan: localhost
Starting scan on host 127.0.0.1
Port 22: OPEN
Port 80: OPEN
Port 139: OPEN
Port 445: OPEN
Port 631: OPEN
[CODE] host에 할당된 기본 IP 찾아내기 (0) | 2012.09.27 |
---|---|
[CODE] 현재 사용중인 interface name 가져오기 (0) | 2012.09.27 |
[CODE] TKINTER 메뉴 만들기 (0) | 2012.09.24 |
[CODE] 시스템 정보 가져오기 (0) | 2012.09.24 |
[CODE] ID/PASSWD 복잡성 체크 (0) | 2012.09.24 |
냉무
[CODE] 하위디렉토리 리스트 구하기 (1) | 2012.10.19 |
---|---|
[파이썬 PYC 파일을 생성하고 싶습니다.] (0) | 2012.09.27 |
from Tkinter import *
import time
def donothing():
filewin = Toplevel(root)
button = Button(filewin, text="Do nothing button")
button.pack()
def input_dev():
frame_input=Frame(base_frame)
frame_input.pack(side=TOP)
lable_input=Label(frame_input,text="input Frame")
lable_input.pack()
def remove_dev():
base_frame.destroy()
root = Tk()
root.title('JAEHOON NMS')
menubar = Menu(root)
filemenu = Menu(menubar, tearoff=0)
filemenu.add_command(label="Add Device", command=input_dev)
filemenu.add_command(label="Remove Device", command=remove_dev)
filemenu.add_command(label="View all device", command=donothing)
filemenu.add_separator()
filemenu.add_command(label="Exit", command=root.quit)
menubar.add_cascade(label="Device", menu=filemenu)
editmenu = Menu(menubar, tearoff=0)
editmenu.add_command(label="Check Ping", command=donothing)
editmenu.add_command(label="Check Cpu/Mem", command=donothing)
menubar.add_cascade(label="Monitor", menu=editmenu)
helpmenu = Menu(menubar, tearoff=0)
helpmenu.add_command(label="Help Index", command=donothing)
helpmenu.add_command(label="About...", command=donothing)
menubar.add_cascade(label="Help", menu=helpmenu)
base_frame=Frame(root, width=500, height=300)
base_frame.pack(fill='both',expand='yes')
base_lable_ip=Label(base_frame, text='IP').grid(row=0,column=0)
base_lable_os=Label(base_frame, text='OS').grid(row=0,column=1)
base_lable_memory=Label(base_frame, text='Memory').grid(row=0,column=2)
ip=Entry(base_frame,text='11.4.14.71')
os=Entry(base_frame)
memory=Entry(base_frame)
ip.grid(row=1,column=0)
os.grid(row=1,column=1)
memory.grid(row=1,column=2)
root.config(menu=menubar)
root.mainloop()
[CODE] 현재 사용중인 interface name 가져오기 (0) | 2012.09.27 |
---|---|
[CODE] Port Scanner 예제 (0) | 2012.09.26 |
[CODE] 시스템 정보 가져오기 (0) | 2012.09.24 |
[CODE] ID/PASSWD 복잡성 체크 (0) | 2012.09.24 |
[CODE] 디스크 사용량 체크 (0) | 2012.09.24 |