In order to time cplex you can also use /usr/bin/time, you can create a script in the ampl.linux-intel64 directory called for instance cplextime and mark it as executable (cmod +x cplextime) with the following content:
#!/bin/bash
/usr/bin/time -v cplex $*
You can then use it in AMPL:
ampl: model diet.mod;
ampl: data diet.dat;
ampl: option solver cplextime.sh;
ampl: solve;
CPLEX
20.1.0.0:
Command being timed: "cplex /tmp/at72633 -AMPL"
User time (seconds): 0.00
System time (seconds): 0.00
Percent of CPU this job got: 7%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.13
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 11016
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 63
Minor (reclaiming a frame) page faults: 351
Voluntary context switches: 58
Involuntary context switches: 0
Swaps: 0
File system inputs: 12488
File system outputs: 8
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
optimal solution; objective 88.2
1 dual simplex iterations (0 in phase I)
ampl: