b1naryc0de 1 Report post Posted June 11, 2005 heheh.. thx.. skrg dah ada dua ahli untuk projek nie.. nanti diorang balik dr gath boleh ajak diorang join Quote Share this post Link to post Share on other sites
b1naryc0de 1 Report post Posted June 12, 2005 (edited) Ok.. aku nak start tambah feature baru -> tail.. Tapi sebelum tue aku nak tentukan interface dia camner.. Macam kat bawah nie ok tak??ditambah dengan button untuk switch on ps -e dan tail atau salah satu drpdnya..Mane lagi elok.. buat macam atas atau pakai tab?? Sebab kalo pakai tab boleh tgk satu jer dalam satu masa.. Macam kat atas boleh tengok serentak.. Camne blank??apa kata ko tambah bleh tail log sekali dan bleh set jenis loghmm.. blh set jenis log.. boleh senarai jenis2 log tue tak?? senarai tue nak letak dalam listbox atau taip kat textbox?? Aku rasa /var/log/messages tue boleh letak kat bawah ps -e (saiz kecik sikit) pastu kat kanan tue letak log lain ikut pilihan.. ok tak?? Edited June 12, 2005 by b1naryc0de Quote Share this post Link to post Share on other sites
blank 1 Report post Posted June 12, 2005 Ko penah install root-tail? dia papar apa yg kita set, tak semestinya message saja...log mail, firewall sbgnya..kalau boleh la...Package .deb tu ada problem lak...jadi forbiden takleh upload, nanti aku godek try upload balik... Quote Share this post Link to post Share on other sites
b1naryc0de 1 Report post Posted June 12, 2005 root-tail?? hmm.. aku baru try sikit td.. fungsi sama dengan tail kan cuma boleh ubah cara dia display macam warna font, size font, letak output kat desktop..Sekarang nie aku sedang cuba atasi beberapa masalah:1) root.. sebab /var/log hanya boleh diaccess oleh root.. Jadi kalo run program tue sebagai user tak dapat keluarkan output..2) Process_read().. tgh cari jalan nak bolehkan dia baca output dari lebih drpd 2 process serentak..3) Log yang ada dalam pc masing2.. messages memang atau majoriti ada dalam sistem linux.. tapi log lain tak semestinya ada dalam pc semua.. Macam emerge.log takde dalam redhat.. Untuk nie mungkin aku buat user masukkan Log yang dia nak.. Tak jadi masalah sangat..buat masa nie aku tumpukan pada 2 masalah utama.. root permission dengan Process_read().. Quote Share this post Link to post Share on other sites
psychoX 6 Report post Posted June 12, 2005 waa.. bak source code kat aku .. nak try tgk .. hehehe... tak balik lagi nih.. ada kat KL lagi.. esok balik.. Quote Share this post Link to post Share on other sites
b1naryc0de 1 Report post Posted June 12, 2005 (edited) Amik kat signature aku.. Besok bolehlah ko tolong develop sekali.. Ni ha kalo ko takde gambas skrg:' Gambas 0.1-r1 class file ' psX ' dibina oleh b1naryc0de ' psX ialah sebuah program yang memaparkan proses yang sedang run dan untuk kill proses2 tertentu ' berasaskan ps dengan kelebihan GUI dan sentiasa direfresh ' memudahkan kill proses PRIVATE $hProcess AS Process PRIVATE $sText AS String PRIVATE iCount AS Integer PRIVATE sInfo AS String[] PRIVATE RemFirstLine AS Boolean PRIVATE AutoRefresh AS Boolean PRIVATE killList AS String '**************************************************************************** 'create column dalam columnview(clOut) '**************************************************************************** PUBLIC SUB ListProcess() DIM it AS Integer DIM it2 AS Integer iCount = 0 clOut.Clear clOut.Columns.Count = 4 '************************************** 'set 4 column (PID,TTY,TIME,CMD) '************************************** clOut.Columns[0].Text = "PID" clOut.Columns[1].Text = "TTY" clOut.Columns[2].Text = "TIME" clOut.Columns[3].Text = "CMD" clOut.Columns[3].Width = 130 clOut.Columns[2].Width = 80 clOut.Columns[1].Width = 80 clOut.Columns[0].Width = 80 WAIT EXEC ["ps" , "-e"] FOR READ WRITE AS $hProcess END '*************************************************************************** 'Tulis output dari process ke clOut '*************************************************************************** PUBLIC SUB UpdateConsole() DIM iPos AS Integer DIM PID AS String DIM TTY AS String DIM _TIME AS String DIM CMD AS String DIM i AS Integer i = 0 iPos = Instr($sText, "\n") IF iPos = 0 THEN RETURN IF (RemFirstLine = TRUE) THEN sInfo.Add("",i) sInfo[i] = $sText RemFirstLine = FALSE ELSE iCount = iCount - 1 PID = Left$($sText, 5) TTY = Mid$($sText, 7, 9) _TIME = Mid$($sText, 16, 8) CMD = Mid$($sText, 25) clOut.Add(iCount,"") clOut[iCount][0] = Trim$(PID) clOut[iCount][1] = Trim$(TTY) clOut[iCount][2] = Trim$(_TIME) clOut[iCount][3] = Trim$(CMD) iCount = iCount + 1 ENDIF iCount=iCount + 1 END PUBLIC SUB Process_Read() DIM sStr AS String LINE INPUT #LAST, sStr $sText = sStr & "\n" UpdateConsole() END PUBLIC SUB Form_Open() sInfo = NEW String[] RemFirstLine = TRUE ListProcess() AutoRefresh = FALSE END PUBLIC SUB bRefresh_Click() RemFirstLine = TRUE ListProcess() END PUBLIC SUB Timer1_Timer() RemFirstLine = TRUE ListProcess() END PUBLIC SUB Timer2_Timer() RemFirstLine = TRUE ListProcess() Timer2.Enabled = FALSE END PUBLIC SUB bAuto_Click() IF (AutoRefresh = FALSE) THEN RemFirstLine = TRUE ListProcess() Timer1.Delay = 20000 Timer1.Enabled = TRUE bAuto.Text = "Off Auto Refresh" AutoRefresh = TRUE ELSE Timer1.Enabled = FALSE bAuto.Text = "On Auto Refresh" AutoRefresh = FALSE ENDIF END PUBLIC SUB clOut_Click() DIM i AS Integer i = clOut.Key killList = clOut[i][0] END PUBLIC SUB bKill_Click() IF killList THEN WAIT EXEC ["kill",killList] killList = "" Timer2.Delay = 1000 Timer2.Enabled = TRUE ENDIF END Edited June 12, 2005 by b1naryc0de Quote Share this post Link to post Share on other sites
fiezaprops211 0 Report post Posted June 13, 2005 Ai,leh mencelah? So interestinglah,cam nk join but i'm newbies..ape yg patut wat utk join korgnye group ye?hehe.. wat da basic terms? teringin nk develop skali au! Quote Share this post Link to post Share on other sites
b1naryc0de 1 Report post Posted June 13, 2005 (edited) psX 0.1.2 dah release.. Sila download dari link kat signature aku.. Minor change jer.. Fungi macam tail tue masih dalam proses.. Ni screenshot psX 0.1.2:Ai,leh mencelah? So interestinglah,cam nk join but i'm newbies..ape yg patut wat utk join korgnye group ye?hehe.. wat da basic terms? teringin nk develop skali au!←Terpulanglah ko boleh buat ape.. Kalo tak tau programming boleh jadi tester ker, dokumentasi ker, buat website untuk program nie ker.. Jadi ko bgtaulah ape yang ko boleh tolong.. Bantuan ko amat dialu2kan..Dalam proses:-root privilege-fungsi tail Edited June 13, 2005 by b1naryc0de Quote Share this post Link to post Share on other sites
psychoX 6 Report post Posted June 14, 2005 ok.. aku dah test program tu .. aku guna gambas lama punye.. sebab aku compile gambas version baru tak jadik.. so .. aku pakai gambas 0.93 .. memula ada bug skit bile nak view about.. tapi bile dah compile balik.. ok. je.. bereh.. Quote Share this post Link to post Share on other sites
b1naryc0de 1 Report post Posted June 14, 2005 (edited) Ko pakai redhat kan?? Ko try run rpm ker tarball?? Tarball memang ada masalah.. kene buka pakai gambas dulu then run baru dia ok..Jadi ko bolehlah tolong develop sekali??Gambas version baru?? 1.9.9 ke 1.0.6?? Aku pakai 1.0.5.. Edited June 14, 2005 by b1naryc0de Quote Share this post Link to post Share on other sites
psychoX 6 Report post Posted June 15, 2005 (edited) gambas 1.0.6 .. aku try compile ..tapi entah cam mana.. tak jalan .. ooo.. aku pakai tarball jerk.. nanti aku try rpm...develop skali .. emm ok jerk..tapi kene study dulu la dia punye sintak .. Edited June 15, 2005 by psychoX Quote Share this post Link to post Share on other sites
b1naryc0de 1 Report post Posted June 15, 2005 Hehe.. sorrylah aku kurang letak komen dalam source dia.. Mula2 jer rajin nak letak komen Kalo tak paham mane2 part dalam source code tue boleh tanya aku.. Quote Share this post Link to post Share on other sites