mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-11-10 04:27:25 +01:00
Fix for path joining in events
This commit is contained in:
parent
bace84bad0
commit
48335dd872
@ -409,13 +409,15 @@ func (m *SlurmJobDetector) NewJobEvent(uid, jobid uint64, timestamp time.Time, o
|
||||
"type-id": fmt.Sprintf("%d", jobid),
|
||||
}
|
||||
userdir := fmt.Sprintf("uid_%d", uid)
|
||||
jobdir := fmt.Sprintf("job_%d", uid)
|
||||
jobdir := fmt.Sprintf("job_%d", jobid)
|
||||
|
||||
// Fill job JSON with data from cgroup
|
||||
var md SlurmJobMetadata
|
||||
job_cpus_file := filepath.Join(cpuset_base, userdir, jobdir, "cpuset.effective_cpus")
|
||||
cclog.ComponentDebug(m.name, job_cpus_file)
|
||||
job_cpus, err := os.ReadFile(job_cpus_file)
|
||||
if err == nil {
|
||||
cclog.ComponentDebug(m.name, string(job_cpus))
|
||||
md.Cpus = ExpandList(string(job_cpus))
|
||||
}
|
||||
job_mems_file := filepath.Join(cpuset_base, userdir, jobdir, "cpuset.effective_mems")
|
||||
|
Loading…
Reference in New Issue
Block a user