Merge branch 'master' of github.com:shirou/gopsutil

This commit is contained in:
Shirou WAKAYAMA 2014-04-28 15:45:33 +09:00
commit 1f1cf900b6
1 changed files with 97 additions and 2 deletions

View File

@ -30,14 +30,109 @@ func Pids() ([]int32, error) {
return ret, nil
}
func (p *Process) Ppid() (int32, error) {
return 0, nil
}
func (p *Process) Name() (string, error) {
name := ""
return name, nil
}
func (p *Process) Exe() (string, error) {
return "", nil
}
func (p *Process) Cmdline() (string, error) {
return "", nil
}
func (p *Process) Cwd() (string, error) {
return "", nil
}
func (p *Process) Parent() (*Process, error) {
return p, nil
}
func (p *Process) Status() (string, error) {
return "", nil
}
func (p *Process) Username() (string, error) {
return "", nil
}
func (p *Process) Uids() ([]int32, error) {
uids := make([]int32, 0)
return uids, nil
}
func (p *Process) Gids() ([]int32, error) {
gids := make([]int32, 0)
return gids, nil
}
func (p *Process) Terminal() (string, error) {
return "", nil
}
func (p *Process) Nice() (int32, error) {
return 0, nil
}
func (p *Process) Ionice() (int32, error) {
return 0, nil
}
func (p *Process) Rlimit() ([]RlimitStat, error) {
rlimit := make([]RlimitStat, 0)
return rlimit, nil
}
func (p *Process) Io_counters() (*Io_countersStat, error) {
return nil, nil
}
func (p *Process) Num_ctx_switches() (int32, error) {
return 0, nil
}
func (p *Process) Num_fds() (int32, error) {
return 0, nil
}
func (p *Process) Num_Threads() (int32, error) {
return 0, nil
}
func (p *Process) Threads() (map[string]string, error) {
ret := make(map[string]string, 0)
return ret, nil
}
func (p *Process) Cpu_times() (*CPU_TimesStat, error) {
return nil, nil
}
func (p *Process) Cpu_percent() (int32, error) {
return 0, nil
}
func (p *Process) Cpu_affinity() ([]int32, error) {
return nil, nil
}
func (p *Process) Memory_info() (*Memory_infoStat, error) {
return nil, nil
}
func (p *Process) Memory_info_ex() (*Memory_info_exStat, error) {
return nil, nil
}
func (p *Process) Memory_percent() (float32, error) {
return 0, nil
}
func (p *Process) Children() ([]*Process, error) {
return nil, nil
}
func (p *Process) Open_files() ([]Open_filesStat, error) {
return nil, nil
}
func (p *Process) Connections() ([]Net_connectionStat, error) {
return nil, nil
}
func (p *Process) Is_running() (bool, error) {
return true, nil
}
func (p *Process) Memory_Maps() (*[]Memory_mapsStat, error) {
ret := make([]Memory_mapsStat, 0)
return &ret, nil
}
func copy_params(k *Kinfo_proc, p *Process) error {
p.Exe = byteToString(k.Ki_comm[:])
p.Ppid = k.Ki_ppid
return nil
}