device status

what is the easiest way to get the status of a gpu? I only need to know if the hardware responds or not, before I even start any CUDA program on it. does the OS dump this info in some logs, or can I query the device somehow?

You could run: nvidia-smi

…and if you are on linux, you can:

this will list your GPUS as seen by the OS
lspci | grep -i nvidia

this will show the version of the nvidia driver loaded by the OS:
cat /proc/driver/nvidia/version

if you compiled the cuda samples this will show info about the GPU
/usr/local/cuda/samples/bin/x86_64/linux/release/deviceQuery

Best regards,
Robi