Infrastructure Analyst Interview Questions

3,736 infrastructure analyst interview questions shared by candidates

(Email Screening Question) A monitoring script, written in Ruby (MRI 2.1.7) and running in a server with Ubuntu 12.04 64bit, with kernel 3.2, periodically checks for the disk I/O of running processes using this snippet of code: def disk_stats(pid) proc_io =File.read("/proc/#{pid}/io") io =YAML.load(proc_io) [ io["read_bytes"], io["write_bytes"] - io["cancelled_write_bytes"] ] end The following exception, however, is sporadically raised from inside the method when trying to acquire the stats: Psych::SyntaxError: (<unknown>): could not find expected ':' while scanning a simple key at line 8 column 1 What do you think is going on here? Is the bug in our disk_stats function, in the YAML parser or in the kernel?
avatar

Git Infrastructure Engineer

Interviewed at GitHub

3.6
Apr 5, 2017

(Email Screening Question) A monitoring script, written in Ruby (MRI 2.1.7) and running in a server with Ubuntu 12.04 64bit, with kernel 3.2, periodically checks for the disk I/O of running processes using this snippet of code: def disk_stats(pid) proc_io =File.read("/proc/#{pid}/io") io =YAML.load(proc_io) [ io["read_bytes"], io["write_bytes"] - io["cancelled_write_bytes"] ] end The following exception, however, is sporadically raised from inside the method when trying to acquire the stats: Psych::SyntaxError: (<unknown>): could not find expected ':' while scanning a simple key at line 8 column 1 What do you think is going on here? Is the bug in our disk_stats function, in the YAML parser or in the kernel?

Viewing 2761 - 2770 interview questions

Glassdoor has 3,736 interview questions and reports from Infrastructure analyst interviews. Prepare for your interview. Get hired. Love your job.