diff --git a/src/plugins/accounting_storage/slurmdbd/accounting_storage_slurmdbd.c b/src/plugins/accounting_storage/slurmdbd/accounting_storage_slurmdbd.c
index c5b0b528010fc68f07aadf3ab60000df3930f6c2..c90747f484fc98c11f47ae2a67630a26d9d3c71a 100644
--- a/src/plugins/accounting_storage/slurmdbd/accounting_storage_slurmdbd.c
+++ b/src/plugins/accounting_storage/slurmdbd/accounting_storage_slurmdbd.c
@@ -160,6 +160,11 @@ static int _setup_job_start_msg(dbd_job_start_msg_t *req,
 
 	/* since we could be sending this after the job is over we
 	   need the original bitmap */
+	if(job_ptr->job_resrcs)
+		req->alloc_cpus = job_ptr->job_resrcs->ncpus;
+	else
+		req->alloc_cpus = job_ptr->total_cpus;
+
 	if(job_ptr->job_resrcs && job_ptr->job_resrcs->node_bitmap) {
 		req->node_inx = bit_fmt(temp_bit, sizeof(temp_bit),
 					job_ptr->job_resrcs->node_bitmap);