Skip to content

Commit 6c84b7b

Browse files
committed
Print timestamp during kerf exec
Signed-off-by: Cong Wang <cwang@multikernel.io>
1 parent 6439f84 commit 6c84b7b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/kerf/exec/main.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
import os
2121
import platform
2222
import sys
23+
import time
24+
from datetime import datetime, timezone
2325
from pathlib import Path
2426
from typing import Optional
2527

@@ -211,7 +213,10 @@ def exec_cmd(name: Optional[str], id: Optional[int], attach_console: bool, verbo
211213
click.echo(f"✓ Kernel image found for instance '{instance_name}'")
212214
click.echo(f"Instance ID to boot: {instance_id}")
213215
click.echo(f"Using reboot syscall with command: 0x{LINUX_REBOOT_CMD_MULTIKERNEL:x}")
214-
click.echo("Calling reboot syscall...")
216+
now = datetime.now(timezone.utc)
217+
epoch_time = time.time()
218+
millis = int((epoch_time % 1) * 1000)
219+
click.echo(f"Calling reboot syscall at {now.strftime('%Y-%m-%d %H:%M:%S')}.{millis:03d} UTC")
215220
else:
216221
click.echo(f"Booting instance '{instance_name}' (ID: {instance_id})...")
217222

0 commit comments

Comments
 (0)