Skip to content

provide more flexible WatchPidFields API #59

@rootfs

Description

@rootfs

I am using go-dcgm to estimate power consumption of processes running in MIG device. The current pid watch function watchPidFields doesn't track the MIG devices.

Would it be possible to create yet another API to pass group.handle directly? So caller can create device groups that consist MIG and call the dcgm API to watch pid.

A hypothetical prototype is like the following:

func WatchPidFieldsWithGroup(updateFreq, maxKeepAge time.Duration, maxKeepSamples int, groupId GroupHandle) error {
	result := C.dcgmWatchPidFields(handle.handle, groupId.handle, C.longlong(updateFreq.Microseconds()), C.double(maxKeepAge.Seconds()), C.int(maxKeepSamples))
	if err := errorString(result); err != nil {
		return &DcgmError{msg: C.GoString(C.errorString(result)), Code: result}
	}
	_ = UpdateAllFields()
	return nil
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions