cat htef1_listener.log | grep -i zxapp |awk -F"[C][O][N][N][E][C][T]" '{print $2}'|awk -F"[P][O][R][T]" '{print $1}' |awk '!a[$0]++'
netstat -anp|grep 1521|grep -i zxapp|awk '{print $5}'|awk -F"[:]" '{print $1}'|awk '!a[$0]++'
select max(t.SAMPLE_TIME),t.MACHINE, t.PROGRAM, t.MODULE, s.username,count(*)
from gv$active_session_history t, dba_users s
where s.user_id = t.user_id
and s.username='HTSC_PRDT2'
and t.sample_time>to_timestamp('20180728-00:00:00','YYYYMMDD-hh24:mi:ss')
and t.SESSION_TYPE <> 'BACKGROUND'
and t.machine not in ('htef02','htef01','HTBK182','WORKGROUP\168-8-11-98') group by t.MACHINE, t.PROGRAM, t.MODULE, s.username order by count(*) desc;
select t.MACHINE, t.PROGRAM, t.MODULE, t.username,count(*)
from gv$session t
where t.username='HTSC_PRDT2'
and t.status <> 'BACKGROUND'
and t.machine not in ('htef02','htef01','HTBK182','WORKGROUP\168-8-11-98')
group by t.MACHINE, t.PROGRAM, t.MODULE, t.username order by count(*) desc;